diff options
author | Shauren <none@none> | 2010-06-16 20:59:15 +0200 |
---|---|---|
committer | Shauren <none@none> | 2010-06-16 20:59:15 +0200 |
commit | 90fceb18ac40636c88e853770fb7c963744cbcd2 (patch) | |
tree | 8ade1d4118880fa4a44cd4dfe7d3203a3511419a | |
parent | d976299dc3baf9ecab7ce45fae32c31e997533ba (diff) |
Fixed spell 64142 (Upper Deck - Create Foam Sword)
--HG--
branch : trunk
-rw-r--r-- | src/server/game/Spells/Auras/SpellEffects.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/game/Spells/Auras/SpellEffects.cpp b/src/server/game/Spells/Auras/SpellEffects.cpp index 4fa56f80893..892162d7689 100644 --- a/src/server/game/Spells/Auras/SpellEffects.cpp +++ b/src/server/game/Spells/Auras/SpellEffects.cpp @@ -5985,6 +5985,17 @@ void Spell::EffectScriptEffect(uint32 effIndex) unitTarget->CastSpell(unitTarget, spellTarget[urand(0,4)], true); break; } + case 64142: // Upper Deck - Create Foam Sword + if (unitTarget->GetTypeId() != TYPEID_PLAYER) + return; + Player *plr = unitTarget->ToPlayer(); + static uint32 const itemId[] = {45061, 45176, 45177, 45178, 45179, 0}; + // player can only have one of these items + for (uint32 *itr = &itemId[0]; *itr; ++itr) + if (plr->HasItemCount(*itr, 1, true)) + return; + DoCreateItem(effIndex, itemId[urand(0,4)]); + return; } break; } |