aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-19 23:01:56 -0500
committermegamage <none@none>2009-08-19 23:01:56 -0500
commit6169483d0f0959c813ad6302cfc9217306a8ef43 (patch)
tree6d49c2aa23e338b9fcc37e393273fc86c3831d10 /src/game/SpellEffects.cpp
parent92f3d270272716c5a43f3916b0db042369808813 (diff)
*Set vehicle owner guid and faction in summonvehicle instead of spelleffecthandler.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 911c75ca6b4..2cadd2262e6 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3364,13 +3364,18 @@ void Spell::EffectSummonType(uint32 i)
case SUMMON_TYPE_VEHICLE:
case SUMMON_TYPE_VEHICLE2:
{
- Vehicle *vehicle = m_caster->SummonVehicle(entry, x, y, z, m_caster->GetOrientation());
+ if(!m_originalCaster)
+ return;
+
+ Vehicle *vehicle = m_originalCaster->SummonVehicle(entry, x, y, z, m_caster->GetOrientation());
if(!vehicle)
return;
- //vehicle->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_caster->GetGUID());
- if(m_originalCaster)
- vehicle->setFaction(m_originalCaster->getFaction());
+ // this is for wintergrasp, need to find a better way
+ // in the future, we can just use getsummoner
+ //vehicle->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCasterGUID);
+ //if(m_originalCaster)
+ // vehicle->setFaction(m_originalCaster->getFaction());
vehicle->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
break;
}
@@ -3463,8 +3468,8 @@ void Spell::EffectSummonType(uint32 i)
if(!vehicle)
return;
- vehicle->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_caster->GetGUID());
- vehicle->setFaction(m_caster->getFaction());
+ //vehicle->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_caster->GetGUID());
+ //vehicle->setFaction(m_caster->getFaction());
vehicle->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
if(damage)