diff --git a/PlayerMethods.h b/PlayerMethods.h index 4e8f8f0..f22a36b 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -2522,49 +2522,47 @@ namespace LuaPlayer } /** - * Repairs [Item] at specified position. Returns total repair cost + * Repairs [Item] at specified position. * * @param uint16 position * @param bool cost = true - * @param float discountMod - * @param bool guildBank = false - * @return uint32 totalCost + * @param float discountMod = 1.0 */ int DurabilityRepair(lua_State* L, Player* player) { uint16 position = Eluna::CHECKVAL(L, 2); - bool cost = Eluna::CHECKVAL(L, 3, true); - float discountMod = Eluna::CHECKVAL(L, 4); - bool guildBank = Eluna::CHECKVAL(L, 5, false); + bool takeCost = Eluna::CHECKVAL(L, 3, true); + float discountMod = Eluna::CHECKVAL(L, 4, 1.0f); #ifdef CLASSIC - Eluna::Push(L, player->DurabilityRepair(position, cost, discountMod)); + player->DurabilityRepair(position, takeCost, discountMod); +#elif defined(TRINITY) + player->DurabilityRepair(position, takeCost, discountMod); #else - Eluna::Push(L, player->DurabilityRepair(position, cost, discountMod, guildBank)); + player->DurabilityRepair(position, takeCost, discountMod, false); #endif - return 1; + return 0; } /** - * Repairs all [Item]s. Returns total repair cost + * Repairs all [Item]s. * - * @param bool cost = true - * @param float discountMod = 1 + * @param bool takeCost = true + * @param float discountMod = 1.0 * @param bool guidBank = false - * @return uint32 totalCost */ int DurabilityRepairAll(lua_State* L, Player* player) { - bool cost = Eluna::CHECKVAL(L, 2, true); + bool takeCost = Eluna::CHECKVAL(L, 2, true); float discountMod = Eluna::CHECKVAL(L, 3, 1.0f); bool guildBank = Eluna::CHECKVAL(L, 4, false); #ifdef CLASSIC - Eluna::Push(L, player->DurabilityRepairAll(cost, discountMod)); + player->DurabilityRepairAll(takeCost, discountMod); #else - Eluna::Push(L, player->DurabilityRepairAll(cost, discountMod, guildBank)); + player->DurabilityRepairAll(takeCost, discountMod, guildBank); #endif - return 1; + return 0; } /**