Unline World
Member
- Joined
- Jul 18, 2019
- Messages
- 27
- Solutions
- 1
- Reaction score
- 10
I'm trying to add a special ability to premium accounts that can use an item without having the minimum level to use, but need help everything i have tried seems to change nothing
here is the part of the code where the is check level
here is the part of the code where the is check level
C++:
uint32_t EquipItem(MoveEvent* moveEvent, Player* player, Item* item, slots_t slot, bool isCheck)
{
if (player->isItemAbilityEnabled(slot)) {
return 1;
}
if (!player->hasFlag(PlayerFlag_IgnoreWeaponCheck) && moveEvent->getWieldInfo() != 0) {
if (player->getLevel() < moveEvent->getReqLevel() || player->getMagicLevel() < moveEvent->getReqMagLv()) {
return 0;
}
if (moveEvent->getReqLevel() > !player->isPremium()) {
return 0;
}
const VocEquipMap& vocEquipMap = moveEvent->getVocEquipMap();
if (!vocEquipMap.empty() && vocEquipMap.find(player->getVocationId()) == vocEquipMap.end()) {
return 0;
}
}