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/game/World.cpp | |
parent | ae55745f2a10078d8361c452b2d97661cea73eb2 (diff) | |
parent | 769c835f266c6e94e878d6e2db0118df1fa7b450 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/World.cpp')
-rw-r--r-- | src/game/World.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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; |