*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -1021,9 +1021,6 @@ int ChatHandler::ParseCommands(const char* text)
|
||||
|
||||
std::string fullcmd = text;
|
||||
|
||||
//if(m_session->GetSecurity() == 0)
|
||||
// return 0;
|
||||
|
||||
/// chat case (.command or !command format)
|
||||
if(m_session)
|
||||
{
|
||||
|
||||
@@ -115,6 +115,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
|
||||
else
|
||||
{
|
||||
sLog.outDebug( "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid)) );
|
||||
return;
|
||||
}
|
||||
|
||||
// remove fake death
|
||||
|
||||
+5
-2
@@ -1145,6 +1145,7 @@ WorldObject::WorldObject()
|
||||
|
||||
m_mapId = 0;
|
||||
m_InstanceId = 0;
|
||||
m_map = NULL;
|
||||
|
||||
m_name = "";
|
||||
|
||||
@@ -1674,12 +1675,14 @@ void WorldObject::SendObjectDeSpawnAnim(uint64 guid)
|
||||
|
||||
Map* WorldObject::GetMap() const
|
||||
{
|
||||
return MapManager::Instance().GetMap(GetMapId(), this);
|
||||
if(m_map) return m_map;
|
||||
else return const_cast<Map*>(m_map) = MapManager::Instance().GetMap(GetMapId(), this);
|
||||
}
|
||||
|
||||
Map* WorldObject::FindMap() const
|
||||
{
|
||||
return MapManager::Instance().FindMap(GetMapId(), GetInstanceId());
|
||||
if(m_map) return m_map;
|
||||
else return const_cast<Map*>(m_map) = MapManager::Instance().FindMap(GetMapId(), GetInstanceId());
|
||||
}
|
||||
|
||||
Map const* WorldObject::GetBaseMap() const
|
||||
|
||||
+4
-4
@@ -439,8 +439,10 @@ class TRINITY_DLL_SPEC WorldObject : public Object
|
||||
|
||||
void GetRandomPoint( float x, float y, float z, float distance, float &rand_x, float &rand_y, float &rand_z ) const;
|
||||
|
||||
void SetMapId(uint32 newMap) { m_mapId = newMap; }
|
||||
void SetMapId(uint32 newMap) { m_mapId = newMap; m_map = NULL; }
|
||||
uint32 GetMapId() const { return m_mapId; }
|
||||
void SetInstanceId(uint32 val) { m_InstanceId = val; m_map = NULL; }
|
||||
uint32 GetInstanceId() const { return m_InstanceId; }
|
||||
|
||||
virtual void SetPhaseMask(uint32 newPhaseMask, bool update);
|
||||
uint32 GetPhaseMask() const { return m_phaseMask; }
|
||||
@@ -502,9 +504,6 @@ class TRINITY_DLL_SPEC WorldObject : public Object
|
||||
|
||||
virtual void SaveRespawnTime() {}
|
||||
|
||||
uint32 GetInstanceId() const { return m_InstanceId; }
|
||||
void SetInstanceId(uint32 val) { m_InstanceId = val; }
|
||||
|
||||
void AddObjectToRemoveList();
|
||||
|
||||
// main visibility check function in normal case (ignore grey zone distance check)
|
||||
@@ -540,6 +539,7 @@ class TRINITY_DLL_SPEC WorldObject : public Object
|
||||
uint32 m_mapId; // object at map with map_id
|
||||
uint32 m_InstanceId; // in map copy with instance id
|
||||
uint32 m_phaseMask; // in area phase state
|
||||
Map *m_map;
|
||||
|
||||
float m_positionX;
|
||||
float m_positionY;
|
||||
|
||||
+1
-1
@@ -18246,7 +18246,7 @@ template<class T>
|
||||
void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<WorldObject*>& visibleNow)
|
||||
{
|
||||
if(!target)
|
||||
return;
|
||||
return;
|
||||
if(HaveAtClient(target))
|
||||
{
|
||||
if(!target->isVisibleForInState(this,true))
|
||||
|
||||
@@ -4019,6 +4019,7 @@ void AuraEffect::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real)
|
||||
if(!Real)
|
||||
return;
|
||||
|
||||
//m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
m_target->UpdateSpeed(MOVE_RUN, true);
|
||||
m_target->UpdateSpeed(MOVE_SWIM, true);
|
||||
m_target->UpdateSpeed(MOVE_FLIGHT, true);
|
||||
@@ -5092,6 +5093,28 @@ void AuraEffect::HandleRangedAmmoHaste(bool apply, bool Real)
|
||||
void AuraEffect::HandleAuraModAttackPower(bool apply, bool Real)
|
||||
{
|
||||
m_target->HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(m_amount), apply);
|
||||
if(apply)
|
||||
switch(m_spellProto->Id){
|
||||
// Warrior & Druid Demoshout should remove stealth
|
||||
case 1160:
|
||||
case 6190:
|
||||
case 11554:
|
||||
case 11555:
|
||||
case 11556:
|
||||
case 25202:
|
||||
case 25203:
|
||||
case 47437: //WotLK spell
|
||||
case 99:
|
||||
case 1735:
|
||||
case 9490:
|
||||
case 9747:
|
||||
case 9898:
|
||||
case 26998:
|
||||
case 48559: //WotLK spell
|
||||
case 48560: //WotLK spell
|
||||
m_target->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void AuraEffect::HandleAuraModRangedAttackPower(bool apply, bool Real)
|
||||
|
||||
@@ -196,8 +196,9 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
|
||||
if(node->delay)
|
||||
i_nextMoveTime.Reset(node->delay);
|
||||
|
||||
//note: disable "start" for mtmap
|
||||
if(node->event_id && rand()%100 < node->event_chance)
|
||||
sWorld.ScriptsStart(sWaypointScripts, node->event_id, &unit, NULL);
|
||||
sWorld.ScriptsStart(sWaypointScripts, node->event_id, &unit, NULL, false);
|
||||
|
||||
MovementInform(unit);
|
||||
unit.UpdateWaypointID(i_currentNode);
|
||||
|
||||
Reference in New Issue
Block a user