📄 bloodymarker.cpp
字号:
//////////////////////////////////////////////////////////////////////////////// Filename : BloodyMarker.cpp// Written by : excel96// Description : //////////////////////////////////////////////////////////////////////////////#include "BloodyMarker.h"#include "ZoneUtil.h"#include "Gpackets/GCSkillToSelfOK1.h"#include "Gpackets/GCSkillToInventoryOK1.h"#include "Gpackets/GCSkillToSelfOK3.h"#include "Gpackets/GCDeleteObject.h"#include "item/VampirePortalItem.h"//////////////////////////////////////////////////////////////////////////////// 轨颇捞绢 牢亥配府 勤甸矾//////////////////////////////////////////////////////////////////////////////void BloodyMarker::execute(Vampire* pVampire, ObjectID_t InvenObjectID, CoordInven_t X, CoordInven_t Y, CoordInven_t TargetX, CoordInven_t TargetY, VampireSkillSlot* pSkillSlot) throw(Error){ __BEGIN_TRY //cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " Begin" << endl; Assert(pVampire != NULL); Assert(pSkillSlot != NULL); try { Player* pPlayer = pVampire->getPlayer(); Zone* pZone = pVampire->getZone(); Inventory* pInventory = pVampire->getInventory(); Assert(pPlayer != NULL); Assert(pInventory != NULL); Assert(pZone != NULL); // 傈里 粮捞扼搁 BloodyMark甫 荤侩且 荐 绝促. // 老窜篮 ZoneID肺 啊绰单.. ZoneInfo俊 持档废 秦具茄促. ///* //int zoneID = pZone->getZoneID(); //if (pZone->getZoneID()==1122 || pZone->getZoneID()==1123) // 捞亥飘 版扁厘/OX 阜扁. by sigi. 2002.8.31 //if (zoneID==1005 || zoneID==1006) if (pZone->isNoPortalZone() || pZone->isMasterLair() // 己 救栏肺档 阜扁. by bezz, Sequoia 2003. 1.20. || pZone->isCastle() || pZone->isHolyLand() ) { executeSkillFailException(pVampire, getSkillType()); //cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl; return; } //*/ Item* pItem = pInventory->getItem(X, Y); // 酒捞袍捞 澄捞芭唱, 器呕 酒捞袍捞 酒聪芭唱, 坷宏璃飘ID啊 撇府促搁... if (pItem == NULL || pItem->getItemClass() != Item::ITEM_CLASS_VAMPIRE_PORTAL_ITEM || pItem->getObjectID() != InvenObjectID) { executeSkillFailException(pVampire, getSkillType()); //cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl; return; } VampirePortalItem* pVampirePortalItem = dynamic_cast<VampirePortalItem*>(pItem); Assert(pVampirePortalItem != NULL); // 轨颇捞绢 器呕 酒捞袍俊 捞固 烙狼狼 困摹啊 扁废登绢 乐阑 版快俊档... if (pVampirePortalItem->getZoneID() != 0 || pVampirePortalItem->getX() != 0 || pVampirePortalItem->getY() != 0) { executeSkillFailException(pVampire, getSkillType()); //cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl; return; } GCSkillToInventoryOK1 _GCSkillToInventoryOK1; SkillType_t SkillType = pSkillSlot->getSkillType(); SkillInfo* pSkillInfo = g_pSkillInfoManager->getSkillInfo(SkillType); int RequiredMP = decreaseConsumeMP(pVampire, pSkillInfo); bool bManaCheck = hasEnoughMana(pVampire, RequiredMP); bool bTimeCheck = verifyRunTime(pSkillSlot); bool bRangeCheck = checkZoneLevelToUseSkill(pVampire); if (bManaCheck && bTimeCheck && bRangeCheck) { // 付唱甫 临捞绊... decreaseMana(pVampire, RequiredMP, _GCSkillToInventoryOK1); SkillInput input(pVampire); SkillOutput output; computeOutput(input, output); // 酒捞袍俊促啊 泅犁狼 困摹甫 扁废窍绊, 技捞宏茄促. pVampirePortalItem->setZoneID(pZone->getZoneID()); pVampirePortalItem->setX(pVampire->getX()); pVampirePortalItem->setY(pVampire->getY()); pVampirePortalItem->save(pVampire->getName(), STORAGE_INVENTORY, 0, X, Y); _GCSkillToInventoryOK1.setSkillType(SkillType); _GCSkillToInventoryOK1.setObjectID(InvenObjectID); _GCSkillToInventoryOK1.setCEffectID(0); _GCSkillToInventoryOK1.setDuration(0); pPlayer->sendPacket(&_GCSkillToInventoryOK1); pSkillSlot->setRunTime(output.Delay); } else { executeSkillFailNormal(pVampire, getSkillType(), NULL); } } catch(Throwable & t) { executeSkillFailException(pVampire, getSkillType()); //cout << t.toString() << endl; } //cout << "TID[" << Thread::self() << "]" << getSkillHandlerName() << " End" << endl; __END_CATCH}BloodyMarker g_BloodyMarker;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -