[0062] Send SMSG_DEFENSE_MESSAGE, SMSG_ZONE_UNDER_ATTACK only to players outside of instances

Also remove team argument from SendDefenseMessage as all texts are sent to all teams, use seperate function to send zone attack message, cleanup some send message functions and remove deprecated send text functions
This commit is contained in:
stfx 2012-08-11 14:34:37 +02:00 committed by Antz
parent a004c7b50c
commit 27fefb1e96
4 changed files with 44 additions and 78 deletions

View file

@ -1994,14 +1994,10 @@ bool Creature::LoadCreatureAddon(bool reload)
return true;
}
/// Send a message to LocalDefense channel for players opposition team in the zone
/// Sends a message to LocalDefense and WorldDefense channels for players of the other team
void Creature::SendZoneUnderAttackMessage(Player* attacker)
{
Team enemy_team = attacker->GetTeam();
WorldPacket data(SMSG_ZONE_UNDER_ATTACK, 4);
data << uint32(GetZoneId());
sWorld.SendGlobalMessage(&data, NULL, (enemy_team == ALLIANCE ? HORDE : ALLIANCE));
sWorld.SendZoneUnderAttackMessage(GetZoneId(), attacker->GetTeam() == ALLIANCE ? HORDE : ALLIANCE);
}
void Creature::SetInCombatWithZone()