当前位置:首页>>魔兽单机>>正文
防外挂之防止增加WPE按键
2013-07-05 17:41:43 作者:网络 来源: 浏览次数:0
摘要:魔兽模拟器服务端防外挂之防止增加WPE按键
 魔兽模拟器服务端防外挂之防止增加WPE按键--比较老的代码了。可以用来作为参考!很老的代码哈(M端的哦)

Index: SpellHandler.cpp
===================================================================
--- SpellHandler.cpp (revision 573)
+++ SpellHandler.cpp (working copy)
@@ -297,6 +297,11 @@
     sLog.outDebug("WORLD: got cast spell packet, spellId - %u, cast_count: %u, unk_flags %u, data length = %i",
         spellId, cast_count, unk_flags, (uint32)recvPacket.size());
 
+    //uint32 i;
+ //Spell* curSpell = _player->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
+ //if (curSpell->m_spellInfo->Id==spellId)
+ // _player->InterruptSpell(CURRENT_CHANNELED_SPELL);
+
     SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId );
 
     if(!spellInfo)
@@ -306,6 +311,34 @@
         return;
     }
 
+
+ //ActionButtonList::iterator buttonItr = m_actionButtons.find(button);
+ //for (uint8 button = 1; button<256 ; ++button )
+ //{
+ for(int32 slot = 0; slot != MAX_ACTION_BUTTONS; ++slot)
+ {
+ //uint32 i=3;
+ uint8 button = slot;
+        uint32 spell_id = ((Player*)mover)->GetActionByActionButton(button);
+        sLog.outError("fiver wpe spell id %u", spell_id);
+    if (spell_id == spellId)
+ {
+ sLog.outError("error wpe spell id %u id2 %u", spell_id,spellId);
+ //recvPacket.rpos(recvPacket.wpos());
+ //return;
+ continue;
+ }
+ else
+ return;
+ }
+ /*if ( !((Player*)mover)->ActionAndSpellJudge(spellId) )
+ {
+ //sLog.outError("error wpe spell id %u id2 %u", spell_id,spell_id);
+ sLog.outError("error wpe spell id %u ", spellId);
+ recvPacket.rpos(recvPacket.wpos()); 
+ return;
+ }*/
+ //}
     if(mover->GetTypeId()==TYPEID_PLAYER)
     {
         // not have spell in spellbook or spell passive and not casted by client
 


相关报道:

[关闭] [返回顶部]


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

机器人国度