Core/Creature: Implement aggro grace period
Port From (https://github.com/TrinityCore/TrinityCore/commit/26d1337461114506ca57e2265d3dc5e96fd08f82)
This commit is contained in:
@@ -360,6 +360,31 @@ namespace Game.Maps
|
||||
bool isCreature;
|
||||
}
|
||||
|
||||
public class CreatureAggroGracePeriodExpiredNotifier : Notifier
|
||||
{
|
||||
Creature i_creature;
|
||||
|
||||
public CreatureAggroGracePeriodExpiredNotifier(Creature c)
|
||||
{
|
||||
i_creature = c;
|
||||
}
|
||||
|
||||
public override void Visit(IList<Creature> objs)
|
||||
{
|
||||
foreach (var creature in objs)
|
||||
{
|
||||
CreatureUnitRelocationWorker(creature, i_creature);
|
||||
CreatureUnitRelocationWorker(i_creature, creature);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Visit(IList<Player> objs)
|
||||
{
|
||||
foreach (var player in objs)
|
||||
CreatureUnitRelocationWorker(i_creature, player);
|
||||
}
|
||||
}
|
||||
|
||||
public class PacketSenderRef : IDoWork<Player>
|
||||
{
|
||||
ServerPacket Data;
|
||||
|
||||
Reference in New Issue
Block a user