VegaS1234

Ignore lower buffs

Nov 19th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.00 KB | None | 0 0
  1. //@usr/src/mainline_released/game/src/char_affect.cpp
  2. //1.) Search for:
  3.     if (lDuration == 0)
  4.     {
  5.         sys_err("Character::AddAffect lDuration == 0 type %d", lDuration, dwType);
  6.         lDuration = 1;
  7.     }
  8. //2.) Add after:
  9. #if defined(ENABLE_IGNORE_LOWER_BUFFS)
  10.     switch (dwType)
  11.     {
  12.         case SKILL_HOSIN:
  13.         case SKILL_REFLECT:
  14.         case SKILL_GICHEON:
  15.         case SKILL_JEONGEOP:
  16.         case SKILL_KWAESOK:
  17.         case SKILL_JEUNGRYEOK:
  18. #if defined(ENABLE_WOLFMAN_CHARACTER)
  19.         case SKILL_CHEONGRANG:
  20. #endif
  21.         {
  22.             const CAffect * pkAffect = FindAffect(dwType);
  23.             if (!pkAffect)
  24.                 break;
  25.                
  26.             if (lApplyValue < pkAffect->lApplyValue)
  27.             {
  28.                 ChatPacket(CHAT_TYPE_INFO, "<AddAffect> has blocked receiving skill (%s) because power is (%ld%%) more small then current one (%ld%%).", CSkillManager::instance().Get(dwType)->szName, lApplyValue, pkAffect->lApplyValue);
  29.                 return false;
  30.             }
  31.         }
  32.         break;
  33.         default:
  34.             break;
  35.     }
  36. #endif
  37.  
  38. //@usr/src/mainline_released/common/service.h
  39. #define ENABLE_IGNORE_LOWER_BUFFS
Add Comment
Please, Sign In to add comment