Summon corpse
I have a 70 necro on the eternal wrath server and my summon corpse and conjure corpse works fine if I have the proper reagents.
The problem is it only works on me, if i cast it on some one else i get the CORPSE_CANT_SENSE message.
I have searched the code like mad and I guess CastToClient() returns a pointer to the target or is that a pointer to the caster?
What does CastToClient() do besides confuse me?
if it is a client it returns from entity.cpp:
return static_cast<Client*>(this);
<code from spell_effects.cpp>
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Summon Corpse: %d", effect_value);
#endif
if(IsClient()) // can only summon corpses of clients
{
Corpse *corpse = entity_list.GetCorpseByOwner(CastToClient());
if(corpse)
{
if(caster)
caster->Message_StringID(4, SUMMONING_CORPSE_OTHER, GetCleanName());
corpse->Summon(CastToClient(), true);
}
else // corpse not found
{
if(caster)
caster->Message_StringID(4, CORPSE_CANT_SENSE);
}
}
break;
}
</code>
I would like to code stuff but I just need a little direction, once I get fiber I will take off with it I think.
Am I posting in the right place?
__________________

Sady Prophet "Druidess"
Sady BoneWaker "Necromancerette"
[font=Book Antiqua][color=Plum] __________________________________________________
I say:
Last edited by sady; 07-13-2006 at 07:03 PM..
|