|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Support::Windows Servers Support forum for Windows EQEMu users. |
 |
|
 |

12-10-2011, 01:55 PM
|
Developer
|
|
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
|
|
I did a debug of this, and had the same issue. The problem is that when the spell is cast, it ends up calling Bot::SpellEffect, which calls Mob::SpellEffect
Code:
case SE_SummonCorpse:
{
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Summon Corpse: %d", effect_value);
#endif
// can only summon corpses of clients
if(IsClient()) {
Client* TargetClient = 0;
if(this->GetTarget())
TargetClient = this->GetTarget()->CastToClient();
else
TargetClient = this->CastToClient();
// We now have a valid target for this spell. Either the caster himself or a targetted player. Lets see if the target is in the group.
Group* group = entity_list.GetGroupByClient(TargetClient);
if(group) {
if(!group->IsGroupMember(TargetClient)) {
Message(13, "Your target must be a group member for this spell.");
break;
}
}
else {
if(TargetClient != this->CastToClient()) {
Message(13, "Your target must be a group member for this spell.");
break;
}
}
// Now we should either be casting this on self or its being cast on a valid group member
if(TargetClient) {
Corpse *corpse = entity_list.GetCorpseByOwner(TargetClient);
if(corpse) {
if(TargetClient == this->CastToClient())
Message_StringID(4, SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
else
Message_StringID(4, SUMMONING_CORPSE_OTHER, TargetClient->CastToMob()->GetCleanName());
corpse->Summon(CastToClient(), true, true);
}
else {
// No corpse found in the zone
Message_StringID(4, CORPSE_CANT_SENSE);
}
}
else {
Message_StringID(4, TARGET_NOT_FOUND);
LogFile->write(EQEMuLog::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id);
}
}
break;
}
where it basically just checks to see if the caster is a client and if the target is a client, and if so, does what it is supposed to do. How this worked before for bots is beyond me. I don't see any change to this code that would have caused it to not work correctly.
I'd have to dig a bit deeper, but if anyone else has any ideas, please let me know.
|
 |
|
 |

12-10-2011, 01:58 PM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
I had problems getting them to rez like 2 years ago, someone fixed it...now not working again. I can see if I can pull my last source and see what changed.
|
 |
|
 |

01-10-2012, 12:54 AM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Quote:
Originally Posted by bad_captain
I did a debug of this, and had the same issue. The problem is that when the spell is cast, it ends up calling Bot::SpellEffect, which calls Mob::SpellEffect
Code:
case SE_SummonCorpse:
{
#ifdef SPELL_EFFECT_SPAM
snprintf(effect_desc, _EDLEN, "Summon Corpse: %d", effect_value);
#endif
// can only summon corpses of clients
if(IsClient()) {
Client* TargetClient = 0;
if(this->GetTarget())
TargetClient = this->GetTarget()->CastToClient();
else
TargetClient = this->CastToClient();
// We now have a valid target for this spell. Either the caster himself or a targetted player. Lets see if the target is in the group.
Group* group = entity_list.GetGroupByClient(TargetClient);
if(group) {
if(!group->IsGroupMember(TargetClient)) {
Message(13, "Your target must be a group member for this spell.");
break;
}
}
else {
if(TargetClient != this->CastToClient()) {
Message(13, "Your target must be a group member for this spell.");
break;
}
}
// Now we should either be casting this on self or its being cast on a valid group member
if(TargetClient) {
Corpse *corpse = entity_list.GetCorpseByOwner(TargetClient);
if(corpse) {
if(TargetClient == this->CastToClient())
Message_StringID(4, SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
else
Message_StringID(4, SUMMONING_CORPSE_OTHER, TargetClient->CastToMob()->GetCleanName());
corpse->Summon(CastToClient(), true, true);
}
else {
// No corpse found in the zone
Message_StringID(4, CORPSE_CANT_SENSE);
}
}
else {
Message_StringID(4, TARGET_NOT_FOUND);
LogFile->write(EQEMuLog::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id);
}
}
break;
}
where it basically just checks to see if the caster is a client and if the target is a client, and if so, does what it is supposed to do. How this worked before for bots is beyond me. I don't see any change to this code that would have caused it to not work correctly.
I'd have to dig a bit deeper, but if anyone else has any ideas, please let me know.
|
But the bot is the caster, and the player is in the group with the bot, so the code would work I would think. I am seriously hoping I have time to look at this tomorrow.
|
 |
|
 |

01-10-2012, 12:39 PM
|
Developer
|
|
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
|
|
I forgot I did a little more testing on this. The part where it actually gets the corpse to summon fails. It just didn't find one even though I was looking at it. I'm in the process of moving my office to the basement so I'm without my server to look further into this right now. Maybe by this weekend if I can get my ethernet rewired by then.
|

01-10-2012, 12:41 PM
|
 |
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
So what is your best guess on the cause ?
You can actually see the spell cast, so I would not think it would be anywhere in the code for the EqEmulator itself. It would be in the bot code correct ??
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:16 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |