Moin,
kleines How-To wie man das Benutzen von Skills ohne ein Target erlauben kann.
Bitte melden Sie sich an, um diesen Link zu sehen.
Dazu muss nur der Client Source ein Wenig angepasst werden.
C: PythonPlayerSkill.cpp
- //1. Search: if (!__IsRightButtonSkillMode()) -> Function void CPythonPlayer::ChangeCurrentSkillNumberOnly(DWORD dwSlotIndex)
- //1. Replace/modify with:
- if (!__IsRightButtonSkillMode())
- {
- #ifndef ENABLE_SKILLSHOT
- if (!__IsTarget())
- {
- PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotUseSkill", Py_BuildValue("(is)", GetMainCharacterIndex(), "NEED_TARGET"));
- return;
- }
- #endif // !ENABLE_SKILLSHOT
- ClickSkillSlot(dwSlotIndex);
- }
- //2. Search: if (pSkillData->IsAutoSearchTarget()) -> Function bool CPythonPlayer::__UseSkill(DWORD dwSlotIndex)
- //2. Replace/modify with:
- if (pSkillData->IsAutoSearchTarget())
- {
- if (pkInstMain->NEW_GetFrontInstance(&pkInstTarget, 2000.0f))
- {
- SetTarget(pkInstTarget->GetVirtualID());
- if (!__ProcessEnemySkillTargetRange(*pkInstMain, *pkInstTarget, *pSkillData, dwSlotIndex))
- return false;
- }
- #ifndef ENABLE_SKILLSHOT
- else
- {
- PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotUseSkill", Py_BuildValue("(is)", GetMainCharacterIndex(), "NEED_TARGET"));
- return false;
- }
- #endif
- }
- //3. Search (same function as in 2):
- else
- {
- PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotUseSkill", Py_BuildValue("(is)", GetMainCharacterIndex(), "NEED_TARGET"));
- return false;
- }
- //3. Replace/modify with:
- #ifdef ENABLE_SKILLSHOT
- else if (!pSkillData->IsMeleeSkill())
- {
- //declare skills that can't be used without target in this array, remember to adjust the size
- int forbiddenSkill[10] = { 20, 35, 66, 91, 106, 107, 108, 76, 78, 81 };
- size_t forbiddenSize = sizeof(forbiddenSkill) / sizeof(int);
- int *end = forbiddenSkill + forbiddenSize;
- if (pSkillData->IsNeedBow())
- {
- PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotUseSkill", Py_BuildValue("(is)", GetMainCharacterIndex(), "NEED_TARGET"));
- return false;
- }
- else
- {
- int* needTarget = std::find(forbiddenSkill, end, GetSkillIndex(dwSlotIndex));
- if (needTarget != end)
- {
- PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotUseSkill", Py_BuildValue("(is)", GetMainCharacterIndex(), "NEED_TARGET"));
- return false;
- }
- }
- }
- #else
- else
- {
- PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotUseSkill", Py_BuildValue("(is)", GetMainCharacterIndex(), "NEED_TARGET"));
- return false;
- }
- #endif