@@ -709,6 +709,18 @@ namespace LuaItem
709709 return 1 ;
710710 }
711711
712+ /* *
713+ * Sets the random properties for the [Item] from a given random property ID.
714+ *
715+ * @param uint32 randomPropId : The ID of the random property to be applied.
716+ */
717+ int SetRandomProperty (Eluna* E, Item* item)
718+ {
719+ uint32 randomPropId = E->CHECKVAL <uint32>(2 );
720+ item->SetItemRandomProperties (randomPropId);
721+ return 0 ;
722+ }
723+
712724 /* OTHER */
713725 /* *
714726 * Removes an enchant from the [Item] by the specified slot
@@ -794,6 +806,7 @@ namespace LuaItem
794806 { " SetOwner" , &LuaItem::SetOwner },
795807 { " SetBinding" , &LuaItem::SetBinding },
796808 { " SetCount" , &LuaItem::SetCount },
809+ { " SetRandomProperty" , &LuaItem::SetRandomProperty },
797810
798811 // Boolean
799812 { " IsSoulBound" , &LuaItem::IsSoulBound },
@@ -826,7 +839,6 @@ namespace LuaItem
826839 { " IsBoundAccountWide" , METHOD_REG_NONE }, // not implemented
827840 { " IsWeaponVellum" , METHOD_REG_NONE }, // not implemented
828841 { " IsArmorVellum" , METHOD_REG_NONE }, // not implemented
829- { " SetRandomProperty" , METHOD_REG_NONE }, // not implemented
830842 { " SetRandomSuffix" , METHOD_REG_NONE } // not implemented
831843 };
832844};
0 commit comments