Jump to content

AzraelTBC

Members
  • Posts

    7
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

AzraelTBC's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. I'm currently working on the cannibal spell, but so far I had limited success. ChanF07 - I couldn't find any SD references to corpse checks. I do think Neo2003 is correct, and I'm having the spell check for corpses via the 20577 check in Spell.cpp. thusfar though, no luck. Will post what I have at the end of the day. Spell.cpp: added the line: case SPELL_EFFECT_DUMMY: { switch(m_spellInfo->Id) { + case 46584: // Raise Dead case 20577: // Cannibalize { My latest feeble attempt in Spelleffects.cpp(believe me I tried quite a few things) but I'm done now: case SPELLFAMILY_DEATHKNIGHT: { switch (m_spellInfo->Id) // Summon Ghoul case 46584: { if( unitTarget->getLevel() > ManGOS::XP::GetGrayLevel(m_caster->getLevel()))) return; if(unitTarget && unitTarget->GetTypeId() == TYPEID_CORPSE && unitTarget->GetCreatureType() == CREATURE_TYPE_HUMANOID) { if((m_caster)->HasSpell(52143) )// Look for Master of Ghouls talent dummy spell (52143) { (m_caster)->CastSpell(unitTarget, 52150,false);// Player has talent; cast pet ghoul spell } else { (m_caster)->CastSpell(unitTarget, 46585,false); } } else { if (!unitTarget && ((Player*)m_caster)->HasItemCount(37201,1)) { ((Player*)m_caster)->DestroyItemCount(37201,1,true); if((m_caster)->HasSpell(52143) )// Look for Master of Ghouls talent dummy spell (52143) { (m_caster)->CastSpell(m_caster, 52150,false);// Player has talent; cast pet ghoul spell } else { (m_caster)->CastSpell(m_caster, 46585,false); } return; } } } } The rest of the pet code is kinda useless without this working, but if you want me to post what I did there, lemme know.
  2. Yeah, the sLog.outError is indeed for me to see exactly where it breaks, it will be removed as soon as it works. Lemme see if I can work around the dead check. It's pretty much the biggest problem at the moment. It would be nice to have a little help from a dev that knows the system well tho. Just to give us a push in the right direction. For the record, I tested: Unit* victim = (Player*)m_caster->SelectNearbyTarget(); SelectNearbyTarget seems to check for enemies, a corpse is hardly an enemy. Damn! Would changing the definition of it to check any nearby target impact alot of other things? Would it be better to make a seperate lets say 'SelectDeadTarget' definition?
  3. This is what I got, I've also started working on the other pet related things regarding this, but, without this code block working as it should it's pretty useless working on the other aspects. Neo2003, the petspells etc all seem to reside in spelleffects.cpp, thus I'll keep this here for now. I'm still learning the pet side of things, and as I pick things up, I can make it better. But, I really need help here. The problem I have is with this bit://tried Dead check(not working): unitTarget->GetHealth() == 0, !unitTarget->isAlive, unitTarget->isDead. I even did deathstate checks. Could anyone enlighten me, please? /*&& unitTarget->getLevel() <= MaNGOS::XP::GetGrayLevel(m_caster->getLevel())*/ --will be checked as soon as I figured out the corpse check. case SPELLFAMILY_DEATHKNIGHT: { switch (m_spellInfo->Id) // Summon Ghoul case 46584: { //tried Dead check(not working): unitTarget->GetHealth() == 0, !unitTarget->isAlive, unitTarget->isDead // See if player is targeting a dead, humanoid, =plevel-3 target if(unitTarget && (unitTarget->GetCreatureType() == CREATURE_TYPE_HUMANOID || unitTarget->GetTypeId() == TYPEID_PLAYER)//works in Dalaran only- have to recheck?!? /*&& unitTarget->getLevel() <= MaNGOS::XP::GetGrayLevel(m_caster->getLevel())*/) { sLog.outError("SUMMON GHOUL: Target is valid."); if((m_caster)->HasSpell(52143) )// Look for Master of Ghouls talent dummy spell (52143) { sLog.outError("SUMMON GHOUL: Master of Ghouls."); (m_caster)->CastSpell(unitTarget, 52150, false);// Player has talent; cast pet ghoul spell } else { sLog.outError("SUMMON GHOUL: No Master of Ghouls."); (m_caster)->CastSpell(unitTarget, 46585, false); } return; } else if( ((Player*)m_caster)->HasItemCount(37201,1)) { sLog.outError("SUMMON GHOUL: Corpse dust present."); ((Player*)m_caster)->DestroyItemCount(37201,1,true); if((m_caster)->HasSpell(52143) )// Look for Master of Ghouls talent dummy spell (52143) { sLog.outError("SUMMON GHOUL: Master of Ghouls - Corpse dust used."); (m_caster)->CastSpell(m_caster, 52150, false);// Player has talent; cast pet ghoul spell } else { sLog.outError("SUMMON GHOUL: No Master of Ghouls - Corpse dust used.."); (m_caster)->CastSpell(m_caster, 46585, false); } return; } else { (m_caster)->CastStop(); sLog.outError("SUMMON GHOUL: Criteria not met!!."); return; } } }
  4. Yes, I'm well aware of that, and thats exactly what I'm saying, I have the nameparts for the ghoul pet. Anyway, I'm looking at your code now, did some changes, added the nameparts and if it works I'll report back. Instead of: if( unitTarget->isDead() && unitTarget->GetCreatureType()==CREATURE_TYPE_HUMANOID && unitTarget->getLevel() >= m_caster->getLevel()-3 ) try if (((unitTarget->GetCreatureType()==CREATURE_TYPE_HUMANOID) && (unitTarget->getLevel() >= m_caster->getLevel()-3)) && !unitTarget->isAlive()) Tested, not working. Trying some alternate options. What does work: Name generation, and save pet name to db. will upload a patch as soon as I tested it a bit.
  5. I have a list of name parts for the pet ghoul, not too sure whether it is core or DB sql. Let me know and I will send it.
  6. Hi Everyone, Before I attempt anything with this, I'd like to know if there's anyone already working on it. I don't want to step on any toe, do any futile work or re-invent the wheel. This is my thoughts on the two issues: Phases - I think the gameobject character and creature tables needs an extra colomb, called phase for argument sake. it should contain a switch fro say, 0 - 4 and only players with the same phase can see it and only players on the same phase can see each other. and so its needs to be called in the world too. Vehicles would need an extra colomb in the creature_template table with the value of the vehicle if it is indeed one, or 0 if not perhaps. I'm just starting to look at it. But, thats my thoughts on it.
  7. Did a SVN checkout yesterday, it looks very interesting. Is any of the current devs interested in this? I saw that their forum is down, I think they had a little run in with the new partner, it's a pity as they had some programmers that could've spent some time on it. http://obscurestudios.com/
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use