mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Merge branch 'master' into 303
Conflicts: src/game/SpellEffects.cpp
This commit is contained in:
commit
397efd4fac
29 changed files with 132 additions and 124 deletions
|
|
@ -1944,7 +1944,7 @@ void Spell::EffectTeleportUnits(uint32 i)
|
|||
((Player*)unitTarget)->TeleportTo(mapid, x, y, z, orientation, TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0));
|
||||
else
|
||||
{
|
||||
MapManager::Instance().GetMap(mapid, m_caster)->CreatureRelocation((Creature*)unitTarget, x, y, z, orientation);
|
||||
m_caster->GetMap()->CreatureRelocation((Creature*)unitTarget, x, y, z, orientation);
|
||||
WorldPacket data;
|
||||
unitTarget->BuildTeleportAckMsg(&data, x, y, z, orientation);
|
||||
unitTarget->SendMessageToSet(&data, false);
|
||||
|
|
@ -1970,7 +1970,7 @@ void Spell::EffectTeleportUnits(uint32 i)
|
|||
((Player*)unitTarget)->TeleportTo(mapid, x, y, z, orientation, TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0));
|
||||
else
|
||||
{
|
||||
MapManager::Instance().GetMap(mapid, m_caster)->CreatureRelocation((Creature*)unitTarget, x, y, z, orientation);
|
||||
m_caster->GetMap()->CreatureRelocation((Creature*)unitTarget, x, y, z, orientation);
|
||||
WorldPacket data;
|
||||
unitTarget->BuildTeleportAckMsg(&data, x, y, z, orientation);
|
||||
unitTarget->SendMessageToSet(&data, false);
|
||||
|
|
@ -2632,7 +2632,7 @@ void Spell::EffectPersistentAA(uint32 i)
|
|||
dynObj->SetUInt32Value(GAMEOBJECT_DISPLAYID, 368003);
|
||||
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee);
|
||||
m_caster->AddDynObject(dynObj);
|
||||
MapManager::Instance().GetMap(dynObj->GetMapId(), dynObj)->Add(dynObj);
|
||||
dynObj->GetMap()->Add(dynObj);
|
||||
}
|
||||
|
||||
void Spell::EffectEnergize(uint32 i)
|
||||
|
|
@ -3473,7 +3473,7 @@ void Spell::EffectAddFarsight(uint32 i)
|
|||
dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65);
|
||||
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x80000002);
|
||||
m_caster->AddDynObject(dynObj);
|
||||
MapManager::Instance().GetMap(dynObj->GetMapId(), dynObj)->Add(dynObj);
|
||||
dynObj->GetMap()->Add(dynObj);
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)m_caster)->SetFarSight(dynObj->GetGUID());
|
||||
}
|
||||
|
|
@ -3671,7 +3671,7 @@ void Spell::EffectTeleUnitsFaceCaster(uint32 i)
|
|||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->TeleportTo(mapid, fx, fy, fz, -m_caster->GetOrientation(), TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0));
|
||||
else
|
||||
MapManager::Instance().GetMap(mapid, m_caster)->CreatureRelocation((Creature*)m_caster, fx, fy, fz, -m_caster->GetOrientation());
|
||||
m_caster->GetMap()->CreatureRelocation((Creature*)m_caster, fx, fy, fz, -m_caster->GetOrientation());
|
||||
}
|
||||
|
||||
void Spell::EffectLearnSkill(uint32 i)
|
||||
|
|
@ -3914,7 +3914,7 @@ void Spell::EffectTameCreature(uint32 /*i*/)
|
|||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level - 1);
|
||||
|
||||
// add to world
|
||||
MapManager::Instance().GetMap(pet->GetMapId(), pet)->Add((Creature*)pet);
|
||||
pet->GetMap()->Add((Creature*)pet);
|
||||
|
||||
// visual effect for levelup
|
||||
pet->SetUInt32Value(UNIT_FIELD_LEVEL, level);
|
||||
|
|
@ -3944,14 +3944,14 @@ void Spell::EffectSummonPet(uint32 i)
|
|||
if( OldSummon->isDead() )
|
||||
return;
|
||||
|
||||
MapManager::Instance().GetMap(OldSummon->GetMapId(), OldSummon)->Remove((Creature*)OldSummon,false);
|
||||
OldSummon->GetMap()->Remove((Creature*)OldSummon,false);
|
||||
OldSummon->SetMapId(m_caster->GetMapId());
|
||||
|
||||
float px, py, pz;
|
||||
m_caster->GetClosePoint(px, py, pz, OldSummon->GetObjectSize());
|
||||
|
||||
OldSummon->Relocate(px, py, pz, OldSummon->GetOrientation());
|
||||
MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster)->Add((Creature*)OldSummon);
|
||||
m_caster->GetMap()->Add((Creature*)OldSummon);
|
||||
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER && OldSummon->isControlled() )
|
||||
{
|
||||
|
|
@ -5485,7 +5485,7 @@ void Spell::EffectMomentMove(uint32 i)
|
|||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->TeleportTo(mapid, fx, fy, fz, unitTarget->GetOrientation(), TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0));
|
||||
else
|
||||
MapManager::Instance().GetMap(mapid, unitTarget)->CreatureRelocation((Creature*)unitTarget, fx, fy, fz, unitTarget->GetOrientation());
|
||||
m_caster->GetMap()->CreatureRelocation((Creature*)unitTarget, fx, fy, fz, unitTarget->GetOrientation());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5595,7 +5595,7 @@ void Spell::EffectCharge(uint32 /*i*/)
|
|||
m_caster->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_WALK_MODE, 1);
|
||||
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
MapManager::Instance().GetMap(m_caster->GetMapId(), m_caster)->CreatureRelocation((Creature*)m_caster,x,y,z,m_caster->GetOrientation());
|
||||
m_caster->GetMap()->CreatureRelocation((Creature*)m_caster,x,y,z,m_caster->GetOrientation());
|
||||
|
||||
// not all charge effects used in negative spells
|
||||
if ( !IsPositiveSpell(m_spellInfo->Id))
|
||||
|
|
@ -6031,7 +6031,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
|||
linkedGO->SetSpellId(m_spellInfo->Id);
|
||||
linkedGO->SetOwnerGUID(m_caster->GetGUID() );
|
||||
|
||||
MapManager::Instance().GetMap(linkedGO->GetMapId(), linkedGO)->Add(linkedGO);
|
||||
linkedGO->GetMap()->Add(linkedGO);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue