Scripts/Eye of Eternity: Fix not being able to press release button on death during phase III

This commit is contained in:
Trista
2013-03-08 19:17:27 +02:00
parent 524a10d628
commit 2dbe3d6cfe
2 changed files with 18 additions and 7 deletions

View File

@@ -19,13 +19,10 @@
SDName: Boss Malygos
Script Data End */
/* Main problems needing most attention:
1) Add support for using Exit Portal while on drake which means to
find seat flag that allows casting on passenger or something that
will prevent valid target filtering.
2) Find what cause client not sending release now availability
if player dies after far falling. For now player needs to logout to get body after
if release button remain unavailable after box popping.*/
/* Main problem needing most attention:
Add support for using Exit Portal while on drake which means to
find seat flag that allows casting on passenger or something that
will prevent valid target filtering. */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"

View File

@@ -152,6 +152,20 @@ public:
}
}
void OnUnitDeath(Unit* unit)
{
if (unit->GetTypeId() != TYPEID_PLAYER)
return;
// For some reason player continues sometimes to be moving after death on this map,
// perhaps only client side issue am not entirtly sure.
// This fix not being able to press release button.
// Variation of this with some check needs to be implemented somewhere within core code.
// It'll stay here until someone find where and why the leak happens.
if (Player* dyingPlayer = unit->ToPlayer())
dyingPlayer->StopMoving();
}
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId)
{
if (eventId == EVENT_FOCUSING_IRIS)