*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -88,7 +88,7 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, uint32
|
||||
SetUInt64Value( DYNAMICOBJECT_CASTER, caster->GetGUID() );
|
||||
SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 );
|
||||
SetUInt32Value( DYNAMICOBJECT_SPELLID, spellId );
|
||||
SetFloatValue( DYNAMICOBJECT_RADIUS, radius * 2); //diameter?
|
||||
SetFloatValue( DYNAMICOBJECT_RADIUS, radius);
|
||||
SetFloatValue( DYNAMICOBJECT_POS_X, x );
|
||||
SetFloatValue( DYNAMICOBJECT_POS_Y, y );
|
||||
SetFloatValue( DYNAMICOBJECT_POS_Z, z );
|
||||
|
||||
@@ -180,7 +180,7 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
|
||||
uint32 eff_index = i_dynobject.GetEffIndex();
|
||||
if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_CHANNEL
|
||||
if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_DEST_DYNOBJ_ALLY
|
||||
|| spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_GROUND)
|
||||
{
|
||||
if(!i_check->IsFriendlyTo(target))
|
||||
|
||||
@@ -209,7 +209,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
|
||||
|
||||
for(uint32 i = 0; i < 3;++i)
|
||||
{
|
||||
if(spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED)
|
||||
if(spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_DYNOBJ_ENEMY)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1032,9 +1032,8 @@ enum Targets
|
||||
TARGET_GAMEOBJECT_ITEM = 26,
|
||||
//TARGET_OBJECT_ITEM_PICKLOCK
|
||||
TARGET_UNIT_MASTER = 27,
|
||||
TARGET_ALL_ENEMY_IN_AREA_CHANNELED = 28,
|
||||
TARGET_UNIT_AREA_ENEMY_CHANNEL = 28,
|
||||
TARGET_UNIT_AREA_ALLY_CHANNEL = 29, // 28,29 only used for effect 27, if interrupt channel, pstAA cancel
|
||||
TARGET_DEST_DYNOBJ_ENEMY = 28,
|
||||
TARGET_DEST_DYNOBJ_ALLY = 29, // only for effect 27
|
||||
TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER = 30, // in TargetB used only with TARGET_ALL_AROUND_CASTER and in self casting range in TargetA
|
||||
TARGET_UNIT_AREA_ALLY = 30,
|
||||
TARGET_ALL_FRIENDLY_UNITS_IN_AREA = 31,
|
||||
|
||||
+10
-9
@@ -1991,17 +1991,13 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
||||
break;
|
||||
}
|
||||
|
||||
if(cur == TARGET_DEST_DEST)
|
||||
break;
|
||||
|
||||
float x, y, z, angle, dist;
|
||||
|
||||
dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
|
||||
if (cur == TARGET_DEST_DEST_RANDOM)
|
||||
dist *= rand_norm();
|
||||
|
||||
float angle;
|
||||
switch(cur)
|
||||
{
|
||||
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||
case TARGET_DEST_DYNOBJ_ALLY:
|
||||
case TARGET_DEST_DEST:
|
||||
return;
|
||||
case TARGET_DEST_DEST_FRONT: angle = 0.0f; break;
|
||||
case TARGET_DEST_DEST_BACK: angle = M_PI; break;
|
||||
case TARGET_DEST_DEST_RIGHT: angle = M_PI/2; break;
|
||||
@@ -2013,6 +2009,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
||||
default: angle = rand_norm()*2*M_PI; break;
|
||||
}
|
||||
|
||||
float dist, x, y, z;
|
||||
dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
|
||||
if (cur == TARGET_DEST_DEST_RANDOM)
|
||||
dist *= rand_norm();
|
||||
|
||||
x = m_targets.m_destX;
|
||||
y = m_targets.m_destY;
|
||||
z = m_targets.m_destZ;
|
||||
|
||||
@@ -2758,7 +2758,6 @@ void Spell::EffectPersistentAA(uint32 i)
|
||||
return;
|
||||
}
|
||||
dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65);
|
||||
dynObj->SetUInt32Value(GAMEOBJECT_DISPLAYID, 368003);
|
||||
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee);
|
||||
caster->AddDynObject(dynObj);
|
||||
dynObj->GetMap()->Add(dynObj);
|
||||
|
||||
@@ -119,8 +119,6 @@ SpellMgr::SpellMgr()
|
||||
case TARGET_UNIT_AREA_ENTRY:
|
||||
case TARGET_UNIT_AREA_PARTY_GROUND:
|
||||
case TARGET_UNIT_AREA_PARTY:
|
||||
//case TARGET_UNIT_AREA_ENEMY_CHANNEL:
|
||||
//case TARGET_UNIT_AREA_ALLY_CHANNEL:
|
||||
SpellTargetType[i] = TARGET_TYPE_AREA_DEST;
|
||||
break;
|
||||
case TARGET_DEST_TARGET_ENEMY:
|
||||
@@ -153,6 +151,8 @@ SpellMgr::SpellMgr()
|
||||
case TARGET_DEST_CASTER_RADIUS:
|
||||
SpellTargetType[i] = TARGET_TYPE_DEST_CASTER;
|
||||
break;
|
||||
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||
case TARGET_DEST_DYNOBJ_ALLY:
|
||||
case TARGET_DEST_DEST:
|
||||
case TARGET_DEST_DEST_FRONT_LEFT:
|
||||
case TARGET_DEST_DEST_BACK_LEFT:
|
||||
@@ -182,9 +182,6 @@ SpellMgr::SpellMgr()
|
||||
case TARGET_UNIT_AREA_ENTRY:
|
||||
case TARGET_UNIT_AREA_PARTY_GROUND:
|
||||
case TARGET_UNIT_AREA_PARTY:
|
||||
//Check persistant aura seperately
|
||||
//case TARGET_UNIT_AREA_ENEMY_CHANNEL:
|
||||
//case TARGET_UNIT_AREA_ALLY_CHANNEL:
|
||||
case TARGET_UNIT_PARTY_TARGET:
|
||||
case TARGET_UNIT_PARTY_CASTER:
|
||||
case TARGET_UNIT_CONE_ENEMY:
|
||||
@@ -501,7 +498,7 @@ bool IsPositiveTarget(uint32 targetA, uint32 targetB)
|
||||
case TARGET_ALL_ENEMY_IN_AREA:
|
||||
case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
|
||||
case TARGET_IN_FRONT_OF_CASTER:
|
||||
case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
|
||||
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||
case TARGET_CURRENT_ENEMY_COORDINATES:
|
||||
case TARGET_UNIT_CHANNEL:
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user