Commit 3fcf610 1 parent 957a3b8 commit 3fcf610 Copy full SHA for 3fcf610
File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -639,14 +639,15 @@ namespace LuaItem
639
639
/* *
640
640
* Returns the damage info of the specified damage slot of this [Item]
641
641
*
642
- * @param uint8 damageSlot : the damage slot specified (1 or 2)
642
+ * @param uint8 damageSlot : the damage slot specified (1 or 2), slot does not apply to Cata
643
643
* @return uint32 damageType
644
644
* @return float minDamage
645
645
* @return float maxDamage
646
646
*/
647
647
int GetDamageInfo (Eluna* E, Item* item)
648
648
{
649
- uint8 damageSlot = E->CHECKVAL <uint8>(2 );
649
+ uint8 damageSlot = E->CHECKVAL <uint8>(2 ); // Not used in Cata but reading for compatibility
650
+ #if ELUNA_EXPANSION < CATA
650
651
uint32 damageType = 0 ;
651
652
float damageMin = 0 ;
652
653
float damageMax = 0 ;
@@ -662,6 +663,11 @@ namespace LuaItem
662
663
E->Push (damageType);
663
664
E->Push (damageMin);
664
665
E->Push (damageMax);
666
+ #else
667
+ E->Push (item->GetTemplate ()->DamageType );
668
+ E->Push (item->GetTemplate ()->GetMinDamage ());
669
+ E->Push (item->GetTemplate ()->GetMaxDamage ());
670
+ #endif
665
671
return 3 ;
666
672
}
667
673
@@ -683,7 +689,11 @@ namespace LuaItem
683
689
*/
684
690
int GetArmor (Eluna* E, Item* item)
685
691
{
692
+ #if ELUNA_EXPANSION < EXP_CATA
686
693
E->Push (item->GetTemplate ()->Armor );
694
+ #else
695
+ E->Push (item->GetTemplate ()->GetArmor ());
696
+ #endif
687
697
return 1 ;
688
698
}
689
699
You can’t perform that action at this time.
0 commit comments