当前位置:首页>>魔兽单机>>正文
飞行宝石代码
2013-03-26 15:52:52 作者:玩家 来源: 浏览次数:0
摘要:飞行宝石代码
  /* Copyright (C) 2006,2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* 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 2 of the License, or
* (at your option) 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#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;
}


相关报道:

[关闭] [返回顶部]


  返回首页 | 最新资讯 | 资源下载 | 魔兽图片 | 单机文档 | 技术攻略 | 玩家视频
备案号:蜀ICP备2024062380号-1
免责声明:本网站为热爱怀旧WOW的玩家们建立的魔兽世界资料网站,仅供交流和学习使用,非盈利和商用.如有侵权之处,请联系我们,我们会在24小时内确认删除侵权内容,谢谢合作。
Copyright © 2024 - 2024 WOWAII.COM Corporation, All Rights Reserved

机器人国度