mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[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:
parent
a004c7b50c
commit
27fefb1e96
4 changed files with 44 additions and 78 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue