mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Quest API] Add Potion Belt Methods (#4634)
* [Quest API] Add Potion Belt Methods * Update client.h * Cleanup * Update client.h * Constrain properly --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
parent
ff86cc3b8a
commit
49917bfb13
@ -1832,6 +1832,29 @@ public:
|
||||
|
||||
Raid *p_raid_instance;
|
||||
|
||||
inline uint32 GetPotionBeltItemIcon(uint8 slot_id)
|
||||
{
|
||||
return EQ::ValueWithin(
|
||||
slot_id,
|
||||
0,
|
||||
EQ::profile::POTION_BELT_SIZE - 1
|
||||
) ? m_pp.potionbelt.Items[slot_id].Icon : 0;
|
||||
};
|
||||
|
||||
inline uint32 GetPotionBeltItemID(uint8 slot_id)
|
||||
{
|
||||
return EQ::ValueWithin(slot_id, 0, EQ::profile::POTION_BELT_SIZE - 1) ? m_pp.potionbelt.Items[slot_id].ID : 0;
|
||||
};
|
||||
|
||||
inline std::string GetPotionBeltItemName(uint8 slot_id)
|
||||
{
|
||||
return EQ::ValueWithin(
|
||||
slot_id,
|
||||
0,
|
||||
EQ::profile::POTION_BELT_SIZE - 1
|
||||
) ? m_pp.potionbelt.Items[slot_id].Name : 0;
|
||||
};
|
||||
|
||||
void ShowDevToolsMenu();
|
||||
CheatManager cheat_manager;
|
||||
|
||||
|
||||
@ -3530,6 +3530,24 @@ std::string Lua_Client::GetBandolierItemName(uint8 bandolier_slot, uint8 slot_id
|
||||
return self->GetBandolierItemName(bandolier_slot, slot_id);
|
||||
}
|
||||
|
||||
uint32 Lua_Client::GetPotionBeltItemIcon(uint8 slot_id)
|
||||
{
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetPotionBeltItemIcon(slot_id);
|
||||
}
|
||||
|
||||
uint32 Lua_Client::GetPotionBeltItemID(uint8 slot_id)
|
||||
{
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetPotionBeltItemID(slot_id);
|
||||
}
|
||||
|
||||
std::string Lua_Client::GetPotionBeltItemName(uint8 slot_id)
|
||||
{
|
||||
Lua_Safe_Call_String();
|
||||
return self->GetPotionBeltItemName(slot_id);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_client() {
|
||||
return luabind::class_<Lua_Client, Lua_Mob>("Client")
|
||||
.def(luabind::constructor<>())
|
||||
@ -3776,6 +3794,9 @@ luabind::scope lua_register_client() {
|
||||
.def("GetNextAvailableDisciplineSlot", (int(Lua_Client::*)(void))&Lua_Client::GetNextAvailableDisciplineSlot)
|
||||
.def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(int))&Lua_Client::GetNextAvailableSpellBookSlot)
|
||||
.def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(void))&Lua_Client::GetNextAvailableSpellBookSlot)
|
||||
.def("GetPotionBeltItemIcon", (uint32(Lua_Client::*)(uint8))&Lua_Client::GetPotionBeltItemIcon)
|
||||
.def("GetPotionBeltItemID", (uint32(Lua_Client::*)(uint8))&Lua_Client::GetPotionBeltItemID)
|
||||
.def("GetPotionBeltItemName", (std::string(Lua_Client::*)(uint8))&Lua_Client::GetPotionBeltItemName)
|
||||
.def("GetPVP", (bool(Lua_Client::*)(void))&Lua_Client::GetPVP)
|
||||
.def("GetPVPPoints", (uint32(Lua_Client::*)(void))&Lua_Client::GetPVPPoints)
|
||||
.def("GetRaceBitmask", (uint16(Lua_Client::*)(void))&Lua_Client::GetRaceBitmask)
|
||||
|
||||
@ -515,6 +515,9 @@ public:
|
||||
uint32 GetBandolierItemIcon(uint8 bandolier_slot, uint8 slot_id);
|
||||
uint32 GetBandolierItemID(uint8 bandolier_slot, uint8 slot_id);
|
||||
std::string GetBandolierItemName(uint8 bandolier_slot, uint8 slot_id);
|
||||
uint32 GetPotionBeltItemIcon(uint8 slot_id);
|
||||
uint32 GetPotionBeltItemID(uint8 slot_id);
|
||||
std::string GetPotionBeltItemName(uint8 slot_id);
|
||||
|
||||
// account data buckets
|
||||
void SetAccountBucket(std::string bucket_name, std::string bucket_value);
|
||||
|
||||
@ -3289,6 +3289,21 @@ std::string Perl_Client_GetBandolierItemName(Client* self, uint8 bandolier_slot,
|
||||
return self->GetBandolierItemName(bandolier_slot, slot_id);
|
||||
}
|
||||
|
||||
uint32 Perl_Client_GetPotionBeltItemIcon(Client* self, uint8 slot_id)
|
||||
{
|
||||
return self->GetPotionBeltItemIcon(slot_id);
|
||||
}
|
||||
|
||||
uint32 Perl_Client_GetPotionBeltItemID(Client* self, uint8 slot_id)
|
||||
{
|
||||
return self->GetPotionBeltItemID(slot_id);
|
||||
}
|
||||
|
||||
std::string Perl_Client_GetPotionBeltItemName(Client* self, uint8 slot_id)
|
||||
{
|
||||
return self->GetPotionBeltItemName(slot_id);
|
||||
}
|
||||
|
||||
void perl_register_client()
|
||||
{
|
||||
perl::interpreter perl(PERL_GET_THX);
|
||||
@ -3534,6 +3549,9 @@ void perl_register_client()
|
||||
package.add("GetMemmedSpells", &Perl_Client_GetMemmedSpells);
|
||||
package.add("GetModCharacterFactionLevel", &Perl_Client_GetModCharacterFactionLevel);
|
||||
package.add("GetMoney", &Perl_Client_GetMoney);
|
||||
package.add("GetPotionBeltItemIcon", &Perl_Client_GetPotionBeltItemIcon);
|
||||
package.add("GetPotionBeltItemID", &Perl_Client_GetPotionBeltItemID);
|
||||
package.add("GetPotionBeltItemName", &Perl_Client_GetPotionBeltItemName);
|
||||
package.add("GetPVP", &Perl_Client_GetPVP);
|
||||
package.add("GetPVPPoints", &Perl_Client_GetPVPPoints);
|
||||
package.add("GetRaceAbbreviation", &Perl_Client_GetRaceAbbreviation);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user