New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some ArcScript fixes #133

Merged
merged 10 commits into from Aug 5, 2012
Next

Implement Script Effect for Spell 8856 "Bending Shinbone"

The Scritp effect has a 17% chance to add Item 7134 "Sturdy Shinbone" to the players inventory. Otherwise it adds Item 7135 "Broken Shinbone"
This fixes Quest 1846 "Dragonmaw Shinbones"
  • Loading branch information...
Artox
Artox committed Feb 21, 2012
commit 0cdaa7f19216e1737651d73b47c9930f2747d58f
@@ -61,6 +61,7 @@ Quest_UnGoro.cpp
Unsorted.cpp
Quest_Warrior.cpp
Quest_Westfall.cpp
Quest_Wetlands.cpp
Quest_Winterspring.cpp
Quest_Zangarmarsh.cpp )
@@ -0,0 +1,42 @@
/*
* ArcScripts for ArcEmu MMORPG Server
* Copyright (C) 2009 ArcEmu Team <http://www.arcemu.org/>
* Copyright (C) 2008-2009 Sun++ Team <http://www.sunscripting.com/>
* Copyright (C) 2008 WEmu Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Setup.h"
#define SPELL_BENDINGSHINBONE 8856
#define ITEM_STURDYSHINBONE 7134
#define ITEM_BROKENSHINBONE 7135
bool BendingShinbone(uint32 i, Spell *pSpell)
{
if(pSpell->p_caster)
{
if(RandomUInt(100) < 17) // 17% chance
pSpell->p_caster->GetItemInterface()->AddItemById(ITEM_STURDYSHINBONE, 1, 0); // Sturdy Dragon
else
pSpell->p_caster->GetItemInterface()->AddItemById(ITEM_BROKENSHINBONE, 1, 0);
}
return true;
}
void SetupWetlands(ScriptMgr *mgr)
{
mgr->register_script_effect(SPELL_BENDINGSHINBONE, &BendingShinbone);
}
@@ -77,6 +77,7 @@ extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
SetupUndercity(mgr);
SetupUnGoro(mgr);
SetupWestfall(mgr);
SetupWetlands(mgr);
SetupWinterspring(mgr);
SetupZangarmarsh(mgr);
SetupBarrens(mgr);
@@ -74,6 +74,7 @@ void SetupTirisfalGlades(ScriptMgr* mgr);
void SetupUndercity(ScriptMgr* mgr);
void SetupUnGoro(ScriptMgr* mgr);
void SetupWestfall(ScriptMgr* mgr);
void SetupWetlands(ScriptMgr *mgr);
void SetupWinterspring(ScriptMgr* mgr);
void SetupZangarmarsh(ScriptMgr* mgr);
void SetupBarrens(ScriptMgr* mgr);
ProTip! Use n and p to navigate between commits in a pull request.