mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#define TYPE_THRALL_PART4 6
|
||||
#define DATA_THRALL 7
|
||||
#define DATA_TARETHA 8
|
||||
#define DATA_EPOCH 9
|
||||
#define WORLD_STATE_OH 2436
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ EndScriptData */
|
||||
|
||||
#define THRALL_ENTRY 17876
|
||||
#define TARETHA_ENTRY 18887
|
||||
#define EPOCH_ENTRY 18096
|
||||
|
||||
#define DRAKE_ENTRY 17848
|
||||
|
||||
@@ -44,6 +45,7 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
|
||||
|
||||
uint64 ThrallGUID;
|
||||
uint64 TarethaGUID;
|
||||
uint64 EpochGUID;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
@@ -51,6 +53,7 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
|
||||
mThrallEventCount = 0;
|
||||
ThrallGUID = 0;
|
||||
TarethaGUID = 0;
|
||||
EpochGUID = 0;
|
||||
|
||||
for(uint8 i = 0; i < ENCOUNTERS; i++)
|
||||
Encounter[i] = NOT_STARTED;
|
||||
@@ -103,6 +106,9 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
|
||||
case TARETHA_ENTRY:
|
||||
TarethaGUID = creature->GetGUID();
|
||||
break;
|
||||
case EPOCH_ENTRY:
|
||||
EpochGUID = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,6 +222,8 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
|
||||
return ThrallGUID;
|
||||
case DATA_TARETHA:
|
||||
return TarethaGUID;
|
||||
case DATA_EPOCH:
|
||||
return EpochGUID;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -812,7 +812,8 @@ bool GossipSelect_npc_taretha(Player *player, Creature *_Creature, uint32 sender
|
||||
if( pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS )
|
||||
{
|
||||
pInstance->SetData(TYPE_THRALL_PART4,IN_PROGRESS);
|
||||
_Creature->SummonCreature(ENTRY_EPOCH,2639.13,698.55,65.43,4.59,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
|
||||
if(pInstance->GetData64(DATA_EPOCH) == 0)
|
||||
_Creature->SummonCreature(ENTRY_EPOCH,2639.13,698.55,65.43,4.59,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
|
||||
|
||||
if (uint64 ThrallGUID = pInstance->GetData64(DATA_THRALL))
|
||||
{
|
||||
|
||||
@@ -451,6 +451,7 @@ bool Map::Add(Player *player)
|
||||
|
||||
player->m_IsInNotifyList = false;
|
||||
player->m_Notified = false;
|
||||
player->m_clientGUIDs.clear();
|
||||
AddNotifier(player);
|
||||
|
||||
return true;
|
||||
@@ -596,24 +597,12 @@ void Map::RelocationNotify()
|
||||
for(std::vector<uint64>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter)
|
||||
{
|
||||
Unit *unit = ObjectAccessor::GetObjectInWorld(*iter, (Unit*)NULL);
|
||||
if(!unit || unit->GetMapId() != GetId())
|
||||
if(!unit || !unit->IsInWorld() || unit->GetMapId() != GetId())
|
||||
{
|
||||
*iter = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!unit->IsInWorld())
|
||||
{
|
||||
//other objs are done during remove
|
||||
if(unit->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Trinity::VisibleChangesNotifier notifier(*unit);
|
||||
VisitWorld(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), notifier);
|
||||
}
|
||||
*iter = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
unit->m_Notified = true;
|
||||
|
||||
if(unit->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -772,8 +761,6 @@ void Map::Update(const uint32 &t_diff)
|
||||
|
||||
void Map::Remove(Player *player, bool remove)
|
||||
{
|
||||
AddUnitToNotify(player);
|
||||
|
||||
// this may be called during Map::Update
|
||||
// after decrement+unlink, ++m_mapRefIter will continue correctly
|
||||
// when the first element of the list is being removed
|
||||
@@ -810,6 +797,7 @@ void Map::Remove(Player *player, bool remove)
|
||||
RemoveFromGrid(player,grid,cell);
|
||||
|
||||
SendRemoveTransports(player);
|
||||
UpdateObjectVisibility(player,cell,p);
|
||||
|
||||
if( remove )
|
||||
DeleteFromWorld(player);
|
||||
|
||||
Reference in New Issue
Block a user