*Do not allow pvp in dk start zone.
*Improve petsetaction code. --HG-- branch : trunk
This commit is contained in:
+10
-5
@@ -63,12 +63,17 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
||||
if(pet->GetTypeId() == TYPEID_PLAYER && !(flag == ACT_COMMAND && spellid == COMMAND_ATTACK))
|
||||
return;
|
||||
|
||||
for(ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end();)
|
||||
if(GetPlayer()->m_Controlled.size() == 1)
|
||||
HandlePetActionHelper(pet, guid1, spellid, flag, guid2);
|
||||
else
|
||||
{
|
||||
Unit *unit = *itr;
|
||||
++itr;
|
||||
if(unit->GetEntry() == pet->GetEntry() && unit->isAlive())
|
||||
HandlePetActionHelper(unit, guid1, spellid, flag, guid2);
|
||||
//If a pet is dismissed, m_Controlled will change
|
||||
std::vector<Unit*> controlled;
|
||||
for(ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
|
||||
if((*itr)->GetEntry() == pet->GetEntry() && (*itr)->isAlive())
|
||||
controlled.push_back(*itr);
|
||||
for(std::vector<Unit*>::iterator itr = controlled.begin(); itr != controlled.end(); ++itr)
|
||||
HandlePetActionHelper(*itr, guid1, spellid, flag, guid2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -6568,7 +6568,7 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||
pvpInfo.endTimer = time(0); // start toggle-off
|
||||
}
|
||||
|
||||
if(zone->flags & (AREA_FLAG_SANCTUARY | AREA_FLAG_UNK7 & AREA_FLAG_UNK7)) // in sanctuary
|
||||
if((zone->flags & AREA_FLAG_SANCTUARY) || zone->mapid == 609) // in sanctuary
|
||||
{
|
||||
SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_SANCTUARY);
|
||||
if(sWorld.IsFFAPvPRealm())
|
||||
|
||||
Reference in New Issue
Block a user