Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
27 kB
2
Indexable
Never
//================================================================================
// MagicSkillWnd.
//================================================================================

class MagicSkillWnd extends UICommonAPI;

enum SkillTypeP {
  Equipment,
  Extra
};

enum SkillType {
  Initial,
  Essential,
  Summon,
  Buff,
  Noblesse,
  Hero,
  Extra
};

var bool m_bShow;
var string m_WindowName;
var private WindowHandle ;
var private ItemWindowHandle [7];
var private WindowHandle [7];
var private WindowHandle [7];
var private int [7];
var private TextureHandle [7];
var private ItemWindowHandle [2];
var private WindowHandle [2];
var private WindowHandle [2];
var private int [2];
var private TextureHandle [2];
var bool othersMax;
var int skillsNum;
var int lastSkillsNum;
var int newSkillsNum;
var bool showNewSkill;
var private WindowHandle ;
var private TextureHandle ;
var array<int> SkillTypeInitial;
var array<int> SkillTypeEssential;
var array<int> SkillTypeSummon;
var array<int> SkillTypeBuff;
var array<int> SkillTypeNoblesse;
var array<int> SkillTypeHero;
var array<int> SkillTypePassive;
var array<int> BlockeableSkills;
var int lastSkillIndex;
const BETWEEN_NAME_ITEM= 3;
const NAME_WND_HEIGHT= 20;
const TOP_MARGIN= 5;
const SKILL_SLOTBG_WIDTH= 216;
const SKILL_ITEMWND_WIDTH= 223;
const Skill_GROUP_COUNT_P= 2;
const Skill_GROUP_COUNT= 7;
const Skill_MAX_COUNT= 24;
const = 24464;
const Teste= 50;

function OnLoad ()
{
  local int i;

  RegisterEvent(1280);
  RegisterEvent(1290);
  RegisterEvent(1900);
   = GetHandle(m_WindowName);
   = GetHandle("SkillNotificationWnd");
   = !("SkillNotificationWnd.IconNotify");
  [0] = (m_WindowName $ ".ASkill.ASkill" $ string(0) $ ".SkillItem");
  [1] = (m_WindowName $ ".ASkill.ASkill" $ string(1) $ ".ActionBasicItem");
  [2] = (m_WindowName $ ".ASkill.ASkill" $ string(2) $ ".MacroItem");
  [3] = (m_WindowName $ ".ASkill.ASkill" $ string(3) $ ".ActionPartyItem"); //buff
  [4] = (m_WindowName $ ".ASkill.ASkill" $ string(4) $ ".ActionSocialItem"); //nobless
  [5] = (m_WindowName $ ".ASkill.ASkill" $ string(5) $ ".SummonedActionWnd"); //hero
  [6] = (m_WindowName $ ".ASkill.ASkill" $ string(6) $ ".PetActionWnd"); //extra
  i = 0;
  if ( i < 7 )
  {
    [i] = GetHandle(m_WindowName $ ".ASkill.ASkill" $ string(i));
    [i] = GetHandle(m_WindowName $ ".ASkill.ASkillName" $ string(i));
    [i] = !(m_WindowName $ ".ASkill.ASkillName" $ string(i) $ ".ASkillBtn" $ string(i));
    i++;
    goto JL0248;
  }
  i = 0;
  if ( i < 2 )
  {
    [i] = (m_WindowName $ ".PSkill.PSkill" $ string(i) $ ".PSkillItem" $ string(i));
    [i] = GetHandle(m_WindowName $ ".PSkill.PSkill" $ string(i));
    [i] = GetHandle(m_WindowName $ ".PSkill.PSkillName" $ string(i));
    [i] = !(m_WindowName $ ".PSkill.PSkillName" $ string(i) $ ".PSkillBtn" $ string(i));
    i++;
    goto JL031A;
  }
  skillsNum = 0;
  lastSkillsNum = 0;
  newSkillsNum = 0;
  othersMax = GetOptionBool("MagicSkillsWnd","OthersMaximized");
}

function OnShow ()
{
  RequestSkillList();
  m_bShow = True;
  (m_WindowName $ ".ASkill.ASkillScroll").SetScrollPosition(0);
  (m_WindowName $ ".PSkill.PSkillScroll").SetScrollPosition(0);
  HideWindowTutorial("MenuWnd.BtnSkill");
  newSkillsNum = 0;
  .HideWindow();
}

function OnDragItemStart (string strID, ItemInfo infItem)
{
  HideWindowTutorial("SkillItem");
}

function OnHide ()
{
  HideWindowTutorial("SkillItem");
  m_bShow = False;
}

function OnTimer (private int )
{
  if (  == 24464 )
  {
    showNewSkill = True;
    .KillTimer(24464);
  }
}

function OnExitState (name a_PreStateName)
{
  showNewSkill = False;
  newSkillsNum = 0;
  if ( .IsShowWindow() )
  {
    .HideWindow();
  }
}

function OnEvent (int Event_ID, string param)
{
  if ( Event_ID == 1280 )
  {
    HandleSkillListStart();
  } else {
    if ( Event_ID == 1290 )
    {
      HandleSkillList(param);
      if ( .IsShowWindow() )
      {
        ();
        ();
      }
    } else {
      if ( Event_ID == 1900 )
      {
        HandleLanguageChanged();
      }
    }
  }
}

function OnClickItem (string strID, int Index)
{
  local int i;
  local ItemInfo infItem;

  i = 0;
  if ( i < 7 )
  {
    if ( strID == [i].GetWindowName() )
    {
      if ( [i].GetItem(Index,infItem) )
      {
        UseSkill(infItem.ClassID);
      }
    }
    i++;
    goto JL0007;
  }
}

function OnClickButton (string strID)
{
  local int i;
  local int Index;
  local int nWndWidth;
  local int nWndHeight;

  Index = int(Right(strID,1));
  if ( InStr(strID,"ASkillHiddenBtn") > -1 )
  {
    if ( [Index] == 1 )
    {
      if ( Index == 1 )
      {
        othersMax = False;
      }
      [Index].GetWindowSize(nWndWidth,nWndHeight);
      [Index].SetTexture("l2ui_ch3.QuestWnd.QuestWndPlusBtn");
      [Index] = 2;
      [Index].HideWindow();
      if ( Index < 7 )
      {
        i = Index + 1;
        if ( i < 7 )
        {
          if ( [i] > 0 )
          {
            [i].ClearAnchor();
            [i].SetAnchor(m_WindowName $ ".ASkill.ASkillName" $ string(Index),"BottomCenter","TopCenter",0,5);
          } else {
            i++;
            goto JL00EA;
          }
        }
      }
    } else {
      if ( [Index] == 2 )
      {
        if ( Index == 1 )
        {
          othersMax = True;
        }
        [Index].GetWindowSize(nWndWidth,nWndHeight);
        [Index].SetTexture("l2ui_ch3.QuestWnd.QuestWndMinusBtn");
        [Index] = 1;
        [Index].ShowWindow();
        if ( Index < 7 )
        {
          i = Index + 1;
          if ( i < 7 )
          {
            if ( [i] > 0 )
            {
              [i].ClearAnchor();
              [i].SetAnchor(m_WindowName $ ".ASkill.ASkillName" $ string(Index),"BottomCenter","TopCenter",0,nWndHeight + 3 + 5);
            } else {
              i++;
              goto JL023A;
            }
          }
        }
      }
    }
    SetOptionBool("MagicSkillsWnd","OthersMaximized",othersMax);
  } else {
    if ( InStr(strID,"PSkillHiddenBtn") > -1 )
    {
      if ( [Index] == 1 )
      {
        [Index].GetWindowSize(nWndWidth,nWndHeight);
        [Index].SetTexture("l2ui_ch3.QuestWnd.QuestWndPlusBtn");
        [Index] = 2;
        [Index].HideWindow();
        if ( Index < 2 )
        {
          i = Index + 1;
          if ( i < 2 )
          {
            if ( [i] > 0 )
            {
              [i].ClearAnchor();
              [i].SetAnchor(m_WindowName $ ".PSkill.PSkillName" $ string(Index),"BottomCenter","TopCenter",0,5);
            } else {
              i++;
              goto JL03D0;
            }
          }
        }
      } else {
        if ( [Index] == 2 )
        {
          [Index].GetWindowSize(nWndWidth,nWndHeight);
JL03D0:
          [Index].SetTexture("l2ui_ch3.QuestWnd.QuestWndMinusBtn");
          [Index] = 1;
          [Index].ShowWindow();
          if ( Index < 2 )
          {
            i = Index + 1;
            if ( i < 2 )
            {
              if ( [i] > 0 )
              {
                [i].ClearAnchor();
                [i].SetAnchor(m_WindowName $ ".PSkill.PSkillName" $ string(Index),"BottomCenter","TopCenter",0,nWndHeight + 3 + 5);
              } else {
                i++;
                goto JL050D;
              }
            }
          }
        }
      }
    }
  }
}

function OnMinOthers ()
{
  local int i;
  local int Index;
  local int nWndWidth;
  local int nWndHeight;

  Index = 1;
  if ( Index == 1 )
  {
    if ( [Index] == 1 )
    {
      [Index].GetWindowSize(nWndWidth,nWndHeight);
      [Index].SetTexture("l2ui_ch3.QuestWnd.QuestWndPlusBtn");
      [Index] = 2;
      [Index].HideWindow();
      if ( Index < 7 )
      {
        i = Index + 1;
        if ( i < 7 )
        {
          if ( [i] > 0 )
          {
            [i].ClearAnchor();
            [i].SetAnchor(m_WindowName $ ".ASkill.ASkillName" $ string(Index),"BottomCenter","TopCenter",0,5);
          } else {
            i++;
            goto JL00B7;
          }
        }
      }
    }
  }
}

function HandleLanguageChanged ()
{
  RequestSkillList();
}

function HandleSkillListStart ()
{
  if (  !showNewSkill )
  {
    .KillTimer(24464);
    .SetTimer(24464,1000);
  }
  lastSkillsNum = skillsNum;
  skillsNum = 0;
  Clear();
}

function Clear ()
{
  local int i;

  i = 0;
  if ( i < 7 )
  {
    [i] = 0;
    [i].SetTexture("l2ui_ch3.QuestWnd.QuestWndMinusBtn");
    [i].HideWindow();
    [i].HideWindow();
    [i].Clear();
    i++;
    goto JL0007;
  }
  i = 0;
  if ( i < 2 )
  {
    [i] = 0;
    [i].SetTexture("l2ui_ch3.QuestWnd.QuestWndMinusBtn");
    [i].HideWindow();
    [i].HideWindow();
    [i].Clear();
    i++;
    goto JL00A9;
  }
}

function HandleSkillList (string param)
{
  local int tmp;
  local ESkillCategory Type;
  local int SkillLevel;
  local int Lock;
  local int SkillID;
  local string strIconName;
  local string strSkillName;
  local string strDescription;
  local string strEnchantName;
  local string strCommand;
  local int iCanEnchant;
  local ItemInfo infItem;

  ParseInt(param,"ClassID",SkillID);
  ParseInt(param,"Type",tmp);
  ParseInt(param,"Level",SkillLevel);
  ParseInt(param,"Lock",Lock);
  ParseString(param,"Name",strSkillName);
  ParseString(param,"IconName",strIconName);
  ParseString(param,"Description",strDescription);
  ParseString(param,"EnchantName",strEnchantName);
  ParseString(param,"Command",strCommand);
  ParseInt(param,"CanEnchant",iCanEnchant);
  infItem.ClassID = SkillID;
  infItem.Level = SkillLevel;
  infItem.Name = strSkillName;
  infItem.AdditionalName = strEnchantName;
  infItem.IconName = strIconName;
  infItem.Description = strDescription;
  infItem.ItemSubType = 2;
  infItem.MacroCommand = strCommand;
  if ( LockByWeapon(SkillID) )
  {
    Lock = 1;
  }
  if ( Lock > 0 )
  {
    infItem.bIsLock = True;
  } else {
    infItem.bIsLock = False;
  }
  infItem.Reserved = iCanEnchant;
  Type = tmp;
  if ( Type != 1 )
  {
    skillsNum++;
  }
  if ( (skillsNum > lastSkillsNum) && showNewSkill )
  {
    ();
  }
  (SkillID,infItem,Type);
}

function  ()
{
  newSkillsNum += skillsNum - lastSkillsNum;
  if ( newSkillsNum > 9 )
  {
    .SetTexture("L2UI_CH3.MenuNotification.SkillCount_09plus");
  } else {
    .SetTexture("L2UI_CH3.MenuNotification.SkillCount_0" $ string(newSkillsNum));
  }
  .ShowWindow();
  lastSkillsNum++;
}

function  (private int , private ItemInfo , private ESkillCategory )
{
  if (  == 1 )
  {
    [GetSkillTypeP()].AddItem();
  } else {
    [GetSkillType()].AddItem();
  }
}

function  ()
{
  local int i;
  local int nItemNum;
  local int nItemWndHeight;
  local int nWndWidth;

  i = 0;
  if ( i < 7 )
  {
    nItemNum = [i].GetItemNum();
    if ( nItemNum < 1 )
    {
      [i] = 0;
      [i].GetWindowSize(nWndWidth,nItemWndHeight);
      [i].SetWindowSize(nWndWidth,0);
    } else {
      [i] = 1;
      nItemWndHeight = ((nItemNum - 1) / 6 + 1) * 32 + (nItemNum - 1) / 6 * 4 + 12;
      [i].SetWindowSize(223,nItemWndHeight);
      [i].SetRow((nItemNum - 1) / 6 + 2);
      if (  ![i].IsShowWindow() )
      {
        [i].ShowWindow();
      }
      if (  ![i].IsShowWindow() )
      {
        [i].ShowWindow();
      }
    }
    i++;
    goto JL0007;
  }
  i = 0;
  if ( i < 2 )
  {
    nItemNum = [i].GetItemNum();
    if ( nItemNum < 1 )
    {
      [i] = 0;
      [i].GetWindowSize(nWndWidth,nItemWndHeight);
      [i].SetWindowSize(nWndWidth,0);
    } else {
      [i] = 1;
      nItemWndHeight = ((nItemNum - 1) / 6 + 1) * 32 + (nItemNum - 1) / 6 * 4 + 12;
      [i].SetWindowSize(223,nItemWndHeight);
      [i].SetRow((nItemNum - 1) / 6 + 2);
      if (  ![i].IsShowWindow() )
      {
        [i].ShowWindow();
      }
      if (  ![i].IsShowWindow() )
      {
        [i].ShowWindow();
      }
    }
    i++;
    goto JL016F;
  }
}

function  ()
{
  local int i;
  local int j;
  local int nWndWidth;
  local int nWndHeight;

  if ( [0] == 0 )
  {
    i = 1;
    if ( i < 7 )
    {
      if ( [i] > 0 )
      {
        [i].SetAnchor(m_WindowName $ ".ASkillScroll","TopLeft","TopLeft",5,4);
        [i].ClearAnchor();
      } else {
        i++;
        goto JL0014;
      }
    }
  }
  i = 0;
  if ( i < 7 )
  {
    if ( [i] > 0 )
    {
      j = i + 1;
      if ( j < 7 )
      {
        if ( [j] > 0 )
        {
          if ( [i] == 1 )
          {
            [i].GetWindowSize(nWndWidth,nWndHeight);
            [j].SetAnchor(m_WindowName $ ".ASkill.ASkillName" $ string(i),"BottomCenter","TopCenter",0,nWndHeight + 3 + 5);
            goto JL01ED;
          } else {
            if ( [i] == 2 )
            {
              [j].SetAnchor(m_WindowName $ ".ASkill.ASkillName" $ string(i),"BottomCenter","TopCenter",0,5);
            } else {
              j++;
              goto JL00C6;
            }
          }
        }
      }
    }
    i++;
    goto JL009B;
  }
  if ( [0] == 0 )
  {
    i = 1;
    if ( i < 2 )
    {
      if ( [i] > 0 )
      {
        [i].SetAnchor(m_WindowName $ ".PSkillScroll","TopLeft","TopLeft",5,4);
        [i].ClearAnchor();
      } else {
        i++;
        goto JL020B;
      }
    }
  }
  i = 0;
  if ( i < 2 )
  {
    if ( [i] > 0 )
    {
      j = i + 1;
      if ( j < 2 )
      {
        if ( [j] > 0 )
        {
          if ( [i] == 1 )
          {
            [i].GetWindowSize(nWndWidth,nWndHeight);
            [j].SetAnchor(m_WindowName $ ".PSkill.PSkillName" $ string(i),"BottomCenter","TopCenter",0,nWndHeight + 3 + 5);
            goto JL03E4;
          } else {
            if ( [i] == 2 )
            {
              [j].SetAnchor(m_WindowName $ ".PSkill.PSkillName" $ string(i),"BottomCenter","TopCenter",0,5);
            } else {
              j++;
              goto JL02BD;
            }
          }
        }
      }
    }
    i++;
    goto JL0292;
  }
}

function bool LockByWeapon (int SkillID)
{
  local ItemInfo item;
  local ItemInfo itemShield;
  local ItemWindowHandle RHand;
  local ItemWindowHandle LHand;

  RHand = ("InventoryWnd.EquipItem_RHand");
  RHand.GetItem(0,item);
  LHand = ("InventoryWnd.EquipItem_LHand");
  LHand.GetItem(0,itemShield);
  if ( isBlockeableSkill(SkillID) )
  {
    if ( itemShield.ItemType == 1 )
    {
      switch (SkillID)
      {
        case 92:
        case 350:
        case 351:
        case 352:
        case 353:
        case 368:
        return False;
        default:
      }
    }
    if ( item.WeaponType == 1 )
    {
      switch (SkillID)
      {
        case 3:
        case 6:
        case 7:
        case 8:
        case 9:
        case 190:
        case 223:
        case 255:
        case 315:
        case 362:
        case 400:
        case 401:
        return False;
        default:
      }
    } else {
      if ( item.WeaponType == 2 )
      {
        switch (SkillID)
        {
          case 3:
          case 6:
          case 7:
          case 8:
          case 9:
          case 100:
          case 190:
          case 255:
          case 260:
          case 315:
          case 400:
          case 401:
          case 348:
          case 362:
          return False;
          default:
        }
      } else {
        if ( item.WeaponType == 3 )
        {
          switch (SkillID)
          {
            case 11:
            case 12:
            case 16:
            case 30:
            case 96:
            case 223:
            case 263:
            case 321:
            case 344:
            case 355:
            case 356:
            case 357:
            case 358:
            case 409:
            case 410:
            return False;
            default:
          }
        } else {
          if ( item.WeaponType == 4 )
          {
            switch (SkillID)
            {
              case 36:
              case 48:
              case 245:
              case 320:
              case 347:
              case 361:
              case 421:
              case 452:
              return False;
              default:
            }
          } else {
            if ( item.WeaponType == 5 )
            {
              switch (SkillID)
              {
                case 17:
                case 29:
                case 35:
                case 50:
                case 54:
                case 76:
                case 81:
                case 83:
                case 109:
                case 120:
                case 280:
                case 281:
                case 282:
                case 284:
                case 292:
                case 298:
                case 346:
                case 425:
                case 443:
                return False;
                default:
              }
            } else {
              if ( item.WeaponType == 6 )
              {
                switch (SkillID)
                {
                  case 24:
                  case 19:
                  case 56:
                  case 101:
                  case 313:
                  case 314:
                  case 343:
                  case 354:
                  case 369:
                  case 414:
                  return False;
                  default:
                }
              } else {
                if ( item.WeaponType == 8 )
                {
                  switch (SkillID)
                  {
                    case 1:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 84:
                    case 223:
                    case 261:
                    case 271:
                    case 272:
                    case 273:
                    case 274:
                    case 275:
                    case 276:
                    case 277:
                    case 307:
                    case 309:
                    case 310:
                    case 311:
                    case 345:
                    case 365:
                    case 366:
                    case 442:
                    case 451:
                    return False;
                    default:
                  }
                }
              }
            }
          }
        }
      }
    }
    return True;
  }
  return False;
}

function int GetSkillType (private int )
{
  switch ()
  {
    case 3:
    case 16:
    case 29:
    case 36:
    case 56:
    case 36:
    case 190:
    case 196:
    case 197:
    case 245:
    case 320:
    case 1001:
    case 1090:
    case 1100:
    case 1147:
    case 1172:
    case 1177:
    case 1178:
    case 1181:
    case 1184:
    case 1274:
    case 1275:
    case 1220:
    return 0;
    case 1:
    case 2:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 11:
    case 12:
    case 17:
    case 18:
    case 19:
    case 22:
    case 24:
    case 28:
    case 30:
    case 42:
    case 48:
    case 50:
    case 54:
    case 60:
    case 69:
    case 72:
    case 76:
    case 78:
    case 81:
    case 82:
    case 86:
    case 92:
    case 94:
    case 95:
    case 98:
    case 99:
    case 100:
    case 101:
    case 110:
    case 111:
    case 112:
    case 115:
    case 116:
    case 120:
    case 121:
    case 122:
    case 130:
    case 131:
    case 139:
    case 176:
    case 181:
    case 222:
    case 254:
    case 256:
    case 260:
    case 261:
    case 263:
    case 278:
    case 279:
    case 280:
    case 281:
    case 284:
    case 286:
    case 287:
    case 288:
    case 296:
    case 297:
    case 298:
    case 302:
    case 312:
    case 313:
    case 314:
    case 315:
    case 317:
    case 318:
    case 320:
    case 321:
    case 322:
    case 334:
    case 335:
    case 337:
    case 339:
    case 340:
    case 341:
    case 342:
    case 343:
    case 344:
    case 345:
    case 346:
    case 347:
    case 350:
    case 351:
    case 353:
    case 352:
    case 354:
    case 355:
    case 356:
    case 357:
    case 358:
    case 361:
    case 362:
    case 367:
    case 368:
    case 369:
    case 400:
    case 401:
    case 402:
    case 403:
    case 404:
    case 406:
    case 407:
    case 408:
    case 409:
    case 410:
    case 412:
    case 413:
    case 414:
    case 420:
    case 421:
    case 422:
    case 423:
    case 424:
    case 425:
    case 438:
    case 439:
    case 440:
    case 441:
    case 442:
    case 443:
    case 445:
    case 446:
    case 447:
    case 449:
    case 450:
    case 451:
    case 452:
    case 453:
    case 461:
    case 1015:
    case 1016:
    case 1056:
    case 1064:
    case 1069:
    case 1071:
    case 1074:
    case 1083:
    case 1092:
    case 1097:
    case 1099:
    case 1104:
    case 1148:
    case 1157:
    case 1159:
    case 1160:
    case 1164:
    case 1169:
    case 1170:
    case 1171:
    case 1174:
    case 1176:
    case 1201:
    case 1208:
    case 1217:
    case 1218:
    case 1219:
    case 1230:
    case 1231:
    case 1234:
    case 1235:
    case 1236:
    case 1237:
    case 1239:
    case 1245:
    case 1246:
    case 1247:
    case 1248:
    case 1254:
    case 1255:
    case 1256:
    case 1263:
    case 1265:
    case 1267:
    case 1269:
    case 1295:
    case 1298:
    case 1283:
    case 1305:
    case 1306:
    case 1307:
    case 1311:
    case 1335:
    case 1336:
    case 1337:
    case 1338:
    case 1339:
    case 1340:
    case 1341:
    case 1342:
    case 1343:
    case 1344:
    case 1345:
    case 1350:
    case 1351:
    case 1358:
    case 1360:
    case 1361:
    case 1366:
    case 1381:
    case 1387:
    case 1394:
    case 1398:
    case 1401:
    case 1402:
    case 1403:
    case 1409:
    case 1410:
    case 1411:
    case 1412:
    case 1417:
    case 1418:
    return 1;
    case 1144:
    case 1262:
    case 1111:
    case 1126:
    case 1127:
    case 1139:
    case 1140:
    case 1141:
    case 1225:
    case 1276:
    case 1299:
    case 1300:
    case 1301:
    case 1331:
    case 1346:
    case 1349:
    case 1383:
    case 1406:
    case 1384:
    case 1145:
    case 1226:
    case 1227:
    case 1332:
    case 1347:
    case 1407:
    case 1277:
    case 1128:
    case 1146:
    case 1228:
    case 1278:
    case 1333:
    case 1348:
    case 1385:
    case 1408:
    case 13:
    case 25:
    case 299:
    case 301:
    case 448:
    case 1129:
    case 1334:
    case 1382:
    case 1154:
    case 283:
    case 10:
    case 1279:
    case 1328:
    case 67:
    case 1280:
    case 1329:
    case 33:
    case 1281:
    case 1330:
    return 2;
    case 271:
    case 273:
    case 275:
    case 277:
    case 309:
    case 311:
    case 272:
    case 274:
    case 276:
    case 307:
    case 310:
    case 365:
    case 264:
    case 266:
    case 268:
    case 270:
    case 305:
    case 308:
    case 364:
    case 265:
    case 267:
    case 269:
    case 304:
    case 306:
    case 363:
    case 349:
    case 1068:
    case 1085:
    case 1204:
    case 1035:
    case 1243:
    case 1240:
    case 1048:
    case 1036:
    case 1389:
    case 1259:
    case 1397:
    case 1059:
    case 1040:
    case 1078:
    case 1077:
    case 1062:
    case 1242:
    case 1045:
    case 1086:
    case 1388:
    case 1087:
    case 1304:
    case 1303:
    case 1268:
    case 1257:
    case 1073:
    case 1044:
    case 1010:
    case 1033:
    case 1032:
    case 1352:
    case 1392:
    case 1393:
    case 1354:
    case 1191:
    case 1182:
    case 1353:
    case 1189:
    case 1043:
    case 1363:
    case 1413:
    case 1356:
    case 1357:
    case 1355:
    case 1416:
    case 1414:
    case 4699:
    case 4700:
    case 4702:
    case 4703:
    case 1007:
    case 1009:
    case 1252:
    case 1310:
    case 1251:
    case 1391:
    case 1284:
    case 1006:
    case 1002:
    case 1253:
    case 1309:
    case 1308:
    case 1390:
    case 1362:
    case 1003:
    case 1005:
    case 1008:
    case 1260:
    case 1004:
    case 1250:
    case 1261:
    case 1249:
    case 1282:
    case 1364:
    case 1365:
    case 1415:
    case 1416:
    case 1414:
    case 4551:
    case 4552:
    case 4553:
    case 4554:
    return 3;
    case 325:
    case 326:
    case 327:
    case 1323:
    case 1324:
    case 1325:
    case 1326:
    case 1327:
    return 4;
    case 395:
    case 396:
    case 1374:
    case 1375:
    case 1376:
    return 5;
    default:
  }
  return 6;
}

function int GetSkillTypeP (private int )
{
  switch ()
  {
    case 239:
    case 227:
    case 233:
    case 236:
    case 235:
    case 251:
    case 234:
    case 259:
    case 231:
    case 232:
    case 253:
    return 0;
    default:
  }
  return 1;
}

function bool isBlockeableSkill (private int )
{
  switch ()
  {
    case 1:
    case 3:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 11:
    case 12:
    case 16:
    case 17:
    case 19:
    case 24:
    case 29:
    case 30:
    case 35:
    case 36:
    case 48:
    case 50:
    case 54:
    case 56:
    case 76:
    case 81:
    case 83:
    case 84:
    case 92:
    case 96:
    case 100:
    case 101:
    case 109:
    case 120:
    case 190:
    case 223:
    case 245:
    case 255:
    case 260:
    case 261:
    case 263:
    case 271:
    case 272:
    case 273:
    case 274:
    case 275:
    case 276:
    case 277:
    case 280:
    case 281:
    case 282:
    case 284:
    case 292:
    case 298:
    case 307:
    case 309:
    case 310:
    case 311:
    case 313:
    case 314:
    case 315:
    case 320:
    case 321:
    case 343:
    case 344:
    case 345:
    case 346:
    case 347:
    case 348:
    case 350:
    case 351:
    case 352:
    case 353:
    case 354:
    case 355:
    case 356:
    case 357:
    case 358:
    case 361:
    case 362:
    case 365:
    case 366:
    case 368:
    case 369:
    case 400:
    case 401:
    case 409:
    case 410:
    case 414:
    case 421:
    case 425:
    case 442:
    case 443:
    case 451:
    case 452:
    return True;
    default:
  }
}

defaultproperties
{
    m_WindowName="MagicSkillWnd"

}
Leave a Comment