• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

C++ Exhausted | Spells vs Runes

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
650
Solutions
14
Reaction score
88
Hi everybody. I wanted to do that exhausted on spells was independent on runes, so it means when I use spells in the same time I can use runes. Now exhausted is for everything.

This is the part of the code:
Code:
    bool exhausted = false;
   if(isAggressive)
   {
       if(!player->hasFlag(PlayerFlag_IgnoreProtectionZone) && player->getZone() == ZONE_PROTECTION)
       {
           player->sendCancelMessage(RET_ACTIONNOTPERMITTEDINPROTECTIONZONE);
           return false;
       }

       if(player->hasCondition(CONDITION_EXHAUST, EXHAUST_COMBAT))
           exhausted = true;
   }
   else if(player->hasCondition(CONDITION_EXHAUST, EXHAUST_HEALING))
       exhausted = true;

   if(exhausted && !player->hasFlag(PlayerFlag_HasNoExhaustion))
   {
       player->sendCancelMessage(RET_YOUAREEXHAUSTED);
       if(isInstant())
           g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);

       return false;
   }
I tried but no success.
Thanks
 
Back
Top