--HG--
branch : trunk
This commit is contained in:
QAston
2009-03-21 19:33:50 +01:00
4 changed files with 11 additions and 15 deletions
+7 -3
View File
@@ -63,9 +63,13 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
if(pet->GetTypeId() == TYPEID_PLAYER && !(flag == ACT_COMMAND && spellid == COMMAND_ATTACK)) if(pet->GetTypeId() == TYPEID_PLAYER && !(flag == ACT_COMMAND && spellid == COMMAND_ATTACK))
return; return;
for(ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr) for(ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end();)
if((*itr)->GetEntry() == pet->GetEntry() && (*itr)->isAlive()) {
HandlePetActionHelper(*itr, guid1, spellid, flag, guid2); Unit *unit = *itr;
++itr;
if(unit->GetEntry() == pet->GetEntry() && unit->isAlive())
HandlePetActionHelper(unit, guid1, spellid, flag, guid2);
}
} }
void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2) void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2)
-6
View File
@@ -8253,7 +8253,6 @@ Unit* Unit::GetCharm() const
void Unit::SetPet(Creature* pet, bool apply) void Unit::SetPet(Creature* pet, bool apply)
{ {
sLog.outError("before %u", GetPetGUID());
if(apply) if(apply)
{ {
if(!GetPetGUID()) if(!GetPetGUID())
@@ -8280,7 +8279,6 @@ void Unit::SetPet(Creature* pet, bool apply)
} }
} }
} }
sLog.outError("after %u", GetPetGUID());
} }
void Unit::SetCharm(Unit* charm, bool apply) void Unit::SetCharm(Unit* charm, bool apply)
@@ -11221,10 +11219,6 @@ void Unit::RemoveFromWorld()
RemoveCharmAuras(); RemoveCharmAuras();
RemoveBindSightAuras(); RemoveBindSightAuras();
RemoveNotOwnSingleTargetAuras(); RemoveNotOwnSingleTargetAuras();
}
//if(m_uint32Values)
{
// if it has charmer or owner, it must be in someone's controllist and server will crash // if it has charmer or owner, it must be in someone's controllist and server will crash
assert(!GetCharmerGUID()); assert(!GetCharmerGUID());
assert(!GetOwnerGUID()); assert(!GetOwnerGUID());
+1 -1
View File
@@ -75,7 +75,7 @@ void WorldLog::outLog(char const *fmt, ...)
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
vfprintf(i_file, fmt, args); vfprintf(i_file, fmt, args);
fprintf(i_file, "\n\n" ); fprintf(i_file, "\n" );
va_end(args); va_end(args);
fflush(i_file); fflush(i_file);
+3 -5
View File
@@ -182,10 +182,8 @@ int WorldSocket::SendPacket (const WorldPacket& pct)
for (uint32 j = 0; j < 16 && p < pct.size (); j++) for (uint32 j = 0; j < 16 && p < pct.size (); j++)
sWorldLog.outLog ("%.2X ", const_cast<WorldPacket&>(pct)[p++]); sWorldLog.outLog ("%.2X ", const_cast<WorldPacket&>(pct)[p++]);
sWorldLog.outLog ("\n"); sWorldLog.outLog ("");
} }
sWorldLog.outLog ("\n\n");
} }
ServerPktHeader header(pct.size()+2, pct.GetOpcode()); ServerPktHeader header(pct.size()+2, pct.GetOpcode());
@@ -692,9 +690,9 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
{ {
for (uint32 j = 0; j < 16 && p < new_pct->size (); j++) for (uint32 j = 0; j < 16 && p < new_pct->size (); j++)
sWorldLog.outLog ("%.2X ", (*new_pct)[p++]); sWorldLog.outLog ("%.2X ", (*new_pct)[p++]);
sWorldLog.outLog ("\n");
sWorldLog.outLog ("");
} }
sWorldLog.outLog ("\n\n");
} }
// like one switch ;) // like one switch ;)