这个是比较老的宝石了。。用于Mangos服务端。。主要作为参考使用
作用:使用该宝石的时候,给玩家自己加上一个37015技能BUFF
#include "../sc_defines.h"
#include "../../../../game/Item.h"
#include "../../../../game/Player.h"
#include "../../../../game/SpellAuras.h"
#define SPELL_FLYING_MOUNT 37015
bool ItemUse_flying_mount(Player *player, Item* _Item, SpellCastTargets const& targets)
{
SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(SPELL_FLYING_MOUNT);
if(spellInfo)
{
for(uint32 i = 0;i<3;i++)
{
uint8 eff = spellInfo->Effect;
if (eff>=TOTAL_SPELL_EFFECTS)
continue;
if (eff == SPELL_EFFECT_APPLY_AURA || eff == SPELL_EFFECT_PERSISTENT_AREA_AURA)
{
Aura *Aur = new Aura(spellInfo, i, NULL, player);
player->AddAura(Aur);
}
}
}
return true;
}
void AddSC_flying_mount()
{
Script *newscript;
newscript = new Script;
newscript->Name="flying_mount";
newscript->pItemUse = ItemUse_flying_mount;
m_scripts[nrscripts++] = newscript;
}
|