mackal

SPA Limits fix

Mar 21st, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.73 KB | None | 0 0
  1. diff -ur MQ2-stock/MQ2Main/MQ2Main.h MQ2/MQ2Main/MQ2Main.h
  2. --- MQ2-stock/MQ2Main/MQ2Main.h 2014-03-18 18:17:02.000000000 -0400
  3. +++ MQ2/MQ2Main/MQ2Main.h   2014-03-21 01:33:15.468941400 -0400
  4. @@ -489,6 +489,7 @@
  5.  EQLIB_API bool GetBuffID(PSPELLBUFF pBuff, DWORD &nID);
  6.  EQLIB_API PCHAR GetLDoNTheme(DWORD LDTheme);
  7.  EQLIB_API bool BuffStackTest(PSPELL aSpell, PSPELL bSpell);
  8. +EQLIB_API bool BlankSpellEffect(int x);
  9.  EQLIB_API DWORD GetItemTimer(PCONTENTS pItem);
  10.  EQLIB_API PCONTENTS GetItemContentsBySlotID(DWORD dwSlotID);
  11.  EQLIB_API PCONTENTS GetItemContentsByName(CHAR *ItemName);
  12. diff -ur MQ2-stock/MQ2Main/MQ2Utilities.cpp MQ2/MQ2Main/MQ2Utilities.cpp
  13. --- MQ2-stock/MQ2Main/MQ2Utilities.cpp  2014-03-18 19:04:18.000000000 -0400
  14. +++ MQ2/MQ2Main/MQ2Utilities.cpp    2014-03-21 01:33:37.103178800 -0400
  15. @@ -5906,6 +5906,23 @@
  16.  }
  17.  
  18.  // ***************************************************************************
  19. +// Function:    BlankSpellEffect
  20. +// Description: Returns boolean true if the SPA is considered blank for
  21. +//              stacking purposes
  22. +// Usage:       BuffStackTest helper function
  23. +// ***************************************************************************
  24. +
  25. +bool BlankSpellEffect(int x)
  26. +{
  27. +    if (x == 57 || (x >= 134 && x <= 144) || x == 254 || x == 311 || x == 348 ||
  28. +            x == 391 || x == 403 || x == 404 || x == 411 || x == 412 ||
  29. +            x == 414 || x == 422 || x == 423 || x == 428)
  30. +        return true;
  31. +
  32. +    return false;
  33. +}
  34. +
  35. +// ***************************************************************************
  36.  // Function:    BuffStackTest
  37.  // Description: Return boolean true if the two spells will stack
  38.  // Usage:       Used by ${Spell[xxx].Stacks}, ${Spell[xxx].StacksPet},
  39. @@ -5922,7 +5939,7 @@
  40.          //Placeholder, exclude it so slots don't match up. Now Check to see if the slots
  41.          //have equal attribute values. If the do, they don't stack.
  42.          //WriteChatf("\nSlot %d: bSpell->Attrib=%d, bSpell->Base=%d, bSpell->TargetType=%d, aSpell->Attrib=%d, aSpell->Base=%d, aSpell->TargetType=%d", i, bSpell->Attrib[i], bSpell->Base[i], bSpell->TargetType, aSpell->Attrib[i], aSpell->Base[i], aSpell->TargetType);
  43. -        if (bSpell->Attrib[i]==aSpell->Attrib[i] && !(bSpell->Attrib[i]==254 || aSpell->Attrib[i]==254) && !(bSpell->Attrib[i]==57 && aSpell->Attrib[i]==57)&& !(bSpell->Attrib[i]==311 && aSpell->Attrib[i]==311))
  44. +        if (bSpell->Attrib[i]==aSpell->Attrib[i] && !BlankSpellEffect(aSpell->Attrib[i]))
  45.              if (!((bSpell->Attrib[i]==10 && (bSpell->Base[i]==-6 || bSpell->Base[i]==0)) ||
  46.                  (aSpell->Attrib[i]==10 && (aSpell->Base[i]==-6 || aSpell->Base[i]==0)) ||
  47.                  (bSpell->Attrib[i]==79 && bSpell->Base[i]>0 && bSpell->TargetType==6) ||
Advertisement
Add Comment
Please, Sign In to add comment