Changeset 145 for trunk/src/game/GameObject.cpp
- Timestamp:
- 11/19/08 13:40:25 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/GameObject.cpp
r120 r145 342 342 if (ok) 343 343 { 344 Unit *caster = owner ? owner : ok; 345 346 caster->CastSpell(ok, goInfo->trap.spellId, true); 344 //Unit *caster = owner ? owner : ok; 345 346 //caster->CastSpell(ok, goInfo->trap.spellId, true); 347 CastSpell(ok, goInfo->trap.spellId); 347 348 m_cooldownTime = time(NULL) + 4; // 4 seconds 348 349 … … 1264 1265 spell->prepare(&targets); 1265 1266 } 1267 1268 void GameObject::CastSpell(Unit* target, uint32 spell) 1269 { 1270 //summon world trigger 1271 Creature *trigger = SummonCreature(12999, GetPositionX(), GetPositionY(), GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 1); 1272 if(!trigger) return; 1273 1274 Unit *owner = GetOwner(); 1275 if(owner) trigger->setFaction(owner->getFaction()); 1276 else trigger->setFaction(14); 1277 trigger->SetVisibility(VISIBILITY_OFF); //should this be true? 1278 trigger->CastSpell(target, spell, true, 0, 0, owner->GetGUID()); 1279 }