diff options
author | megamage <none@none> | 2009-03-05 15:24:09 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-05 15:24:09 -0600 |
commit | 635faad2bccb05397380737c26d61d71e1a8bcfb (patch) | |
tree | 4d7bef1e2eff681aaff35086fe2ca6f18971f113 /src | |
parent | ae55745f2a10078d8361c452b2d97661cea73eb2 (diff) | |
parent | 769c835f266c6e94e878d6e2db0118df1fa7b450 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/DynamicObject.cpp | 13 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 1 | ||||
-rw-r--r-- | src/game/Transports.cpp | 3 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 | ||||
-rw-r--r-- | src/game/World.cpp | 15 | ||||
-rw-r--r-- | src/game/World.h | 1 |
7 files changed, 28 insertions, 9 deletions
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index d14b213d9fa..52ad9d61a45 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -113,12 +113,15 @@ void DynamicObject::Update(uint32 p_time) else deleteThis = true; - if(m_updateTimer < p_time) + if(m_effIndex < 4) { - Trinity::DynamicObjectUpdater notifier(*this,caster); - VisitNearbyObject(GetRadius(), notifier); - m_updateTimer = 500; // is this official-like? - }else m_updateTimer -= p_time; + if(m_updateTimer < p_time) + { + Trinity::DynamicObjectUpdater notifier(*this,caster); + VisitNearbyObject(GetRadius(), notifier); + m_updateTimer = 500; // is this official-like? + }else m_updateTimer -= p_time; + } if(deleteThis) { diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index a2d48e02036..b95f7cdc793 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3628,7 +3628,7 @@ void Spell::EffectAddFarsight(uint32 i) float radius = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); int32 duration = GetSpellDuration(m_spellInfo); DynamicObject* dynObj = new DynamicObject; - if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, i, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius)) + if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, 4, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius)) { delete dynObj; return; diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index fa0eecfa629..9bd7c31e951 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -733,6 +733,7 @@ bool IsSingleTargetSpells(SpellEntry const *spellInfo1, SpellEntry const *spellI switch(spec1) { case SPELL_JUDGEMENT: + case SPELL_MAGE_POLYMORPH: if(GetSpellSpecific(spellInfo2->Id) == spec1) return true; break; diff --git a/src/game/Transports.cpp b/src/game/Transports.cpp index a46fdee553b..865c9ccf0b8 100644 --- a/src/game/Transports.cpp +++ b/src/game/Transports.cpp @@ -554,11 +554,10 @@ void Transport::Update(uint32 /*p_time*/) //MapManager::Instance().GetMap(m_curr->second.mapid)->Add((GameObject *)this); // -> // ->Add(t); if ((sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES)==0) - sLog.outDetail("%s moved to %f %f %f %d", this->m_name.c_str(), m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid); + sLog.outDetail("%s moved to %d %f %f %f %d", this->m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid); //Transport Event System CheckForEvent(this->GetEntry(), m_curr->second.id); - sLog.outDetail("%s is at wp id: %u", this->m_name.c_str(), m_curr->second.id); } } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 25c3aee65e4..e52f15250e8 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10268,7 +10268,7 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde } } - if(spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellProto->spellLevel && + if(!basePointsPerLevel && (spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellProto->spellLevel) && spellProto->Effect[effect_index] != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE && spellProto->Effect[effect_index] != SPELL_EFFECT_KNOCK_BACK) //there are many more: slow speed, -healing pct diff --git a/src/game/World.cpp b/src/game/World.cpp index ff1e5f616a7..e0295b208e6 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -2501,6 +2501,21 @@ void World::ScriptsProcess() break; } + case SCRIPT_COMMAND_KILL: + { + if(!source || ((Creature*)source)->isDead()) + break; + + ((Creature*)source)->DealDamage(((Creature*)source), ((Creature*)source)->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + switch(step.script->dataint) + { + case 0: break; //return false not remove corpse + case 1: ((Creature*)source)->RemoveCorpse(); break; + } + break; + } + default: sLog.outError("Unknown script command %u called.",step.script->command); break; diff --git a/src/game/World.h b/src/game/World.h index f8a587e7edd..de5934ec40e 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -345,6 +345,7 @@ enum RealmZone #define SCRIPT_COMMAND_LOAD_PATH 16 // source = unit, path = datalong, repeatable datalong2 #define SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT 17 // datalong scriptid, lowguid datalong2, dataint table #define SCRIPT_COMMAND_PLAYSOUND 18 // datalong soundid, datalong2 play only self +#define SCRIPT_COMMAND_KILL 19 // datalong removecorpse /// Storage class for commands issued for delayed execution struct CliCommandHolder |