吾爱尚玩资源基地

标题: WOW私服单机版M端的一个给自己加飞行BUFF的宝石脚本 [打印本页]

作者: admin    时间: 2016-4-23 16:40
标题: WOW私服单机版M端的一个给自己加飞行BUFF的宝石脚本
这个是比较老的宝石了。。用于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;
}


作者: 我回来了    时间: 2016-10-19 06:09
感谢楼主分享,祝愿吾爱尚玩越来越好!




欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/) Powered by Discuz! X3.4