Code: Select all
function=function@entry=0x754310 <ZoneServer::GetSpawnByID(unsigned int)::__FUNCTION__> "GetSpawnByID", line=line@entry=3424) at ../common/Mutex.cpp:91
#6 0x00000000006c1e94 in ZoneServer::GetSpawnByID (this=0x86cd7f0,
id=id@entry=22388) at zoneserver.cpp:3424
#7 0x00000000005ed6ae in NPC::GetOwner (this=<optimized out>) at NPC.cpp:861
#8 0x000000000052a763 in Entity::AddHate (this=0x25, attacker=0x0, hate=69)
at Combat.cpp:959
#9 0x000000000052a6dd in Entity::AddHate (this=0x25, attacker=0x0, hate=69)
at Combat.cpp:965
#10 0x000000000052a773 in Entity::AddHate (this=0x25, attacker=0x0, hate=69)
---Type <return> to continue, or q <return> to quit---
at Combat.cpp:959
#11 0x000000000052a6dd in Entity::AddHate (this=0x25, attacker=0x0, hate=69)
at Combat.cpp:965
#12 0x000000000052a773 in Entity::AddHate (this=0x25, attacker=0x0, hate=69)
at Combat.cpp:959
Code: Select all
// If pet is adding hate add some to the pets owner as well
if (attacker->IsNPC() && ((NPC*)attacker)->IsPet())
AddHate(((NPC*)attacker)->GetOwner(), 5);
// If player and player has a pet and protect master is set add hate to the pet
if (IsPlayer() && HasPet() && (((Player*)this)->GetInfoStruct()->pet_behavior & 1)) {
// If we have a combat pet add hate to it
if (((Player*)this)->GetPet())
AddHate(((Player*)this)->GetPet(), 1);
if (((Player*)this)->GetCharmedPet())
AddHate(((Player*)this)->GetCharmedPet(), 1);
}Code: Select all
Spawn* ZoneServer::GetSpawnByID(int32 id) {
Spawn* ret = 0;
MSpawnList.readlock(__FUNCTION__, __LINE__);
if (spawn_list.count(id) > 0)
ret = spawn_list[id];
MSpawnList.releasereadlock(__FUNCTION__, __LINE__);
return ret;
}