吾爱尚玩资源基地
标题:
魔兽私服防外挂之防止增加WPE按键
[打印本页]
作者:
admin
时间:
2016-4-18 22:51
标题:
魔兽私服防外挂之防止增加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
欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/)
Powered by Discuz! X3.4