mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-19 20:02:25 +00:00
Merge branch 'master' of github.com:EQEmu/Server
This commit is contained in:
commit
da974e3b9e
@ -1340,6 +1340,80 @@ void Lua_Client::QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint3
|
||||
self->QuestReward(target, copper, silver, gold, platinum, itemid, exp, faction);
|
||||
}
|
||||
|
||||
void Lua_Client::QuestReward(Lua_Mob target, luabind::adl::object reward) {
|
||||
Lua_Safe_Call_Void();
|
||||
|
||||
if (luabind::type(reward) != LUA_TTABLE) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 copper = 0;
|
||||
uint32 silver = 0;
|
||||
uint32 gold = 0;
|
||||
uint32 platinum = 0;
|
||||
uint32 itemid = 0;
|
||||
uint32 exp = 0;
|
||||
bool faction = false;
|
||||
|
||||
auto cur = reward["copper"];
|
||||
if (luabind::type(cur) != LUA_TNIL) {
|
||||
try {
|
||||
copper = luabind::object_cast<uint32>(cur);
|
||||
} catch (luabind::cast_failed) {
|
||||
}
|
||||
}
|
||||
|
||||
cur = reward["silver"];
|
||||
if (luabind::type(cur) != LUA_TNIL) {
|
||||
try {
|
||||
silver = luabind::object_cast<uint32>(cur);
|
||||
} catch (luabind::cast_failed) {
|
||||
}
|
||||
}
|
||||
|
||||
cur = reward["gold"];
|
||||
if (luabind::type(cur) != LUA_TNIL) {
|
||||
try {
|
||||
gold = luabind::object_cast<uint32>(cur);
|
||||
} catch (luabind::cast_failed) {
|
||||
}
|
||||
}
|
||||
|
||||
cur = reward["platinum"];
|
||||
if (luabind::type(cur) != LUA_TNIL) {
|
||||
try {
|
||||
platinum = luabind::object_cast<uint32>(cur);
|
||||
} catch (luabind::cast_failed) {
|
||||
}
|
||||
}
|
||||
|
||||
cur = reward["itemid"];
|
||||
if (luabind::type(cur) != LUA_TNIL) {
|
||||
try {
|
||||
itemid = luabind::object_cast<uint32>(cur);
|
||||
} catch (luabind::cast_failed) {
|
||||
}
|
||||
}
|
||||
|
||||
cur = reward["exp"];
|
||||
if (luabind::type(cur) != LUA_TNIL) {
|
||||
try {
|
||||
exp = luabind::object_cast<uint32>(cur);
|
||||
} catch (luabind::cast_failed) {
|
||||
}
|
||||
}
|
||||
|
||||
cur = reward["faction"];
|
||||
if (luabind::type(cur) != LUA_TNIL) {
|
||||
try {
|
||||
faction = luabind::object_cast<bool>(cur);
|
||||
} catch (luabind::cast_failed) {
|
||||
}
|
||||
}
|
||||
|
||||
self->QuestReward(target, copper, silver, gold, platinum, itemid, exp, faction);
|
||||
}
|
||||
|
||||
uint32 Lua_Client::GetMoney(uint8 type, uint8 subtype) {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetMoney(type, subtype);
|
||||
@ -1612,6 +1686,7 @@ luabind::scope lua_register_client() {
|
||||
.def("QuestReward", (void(Lua_Client::*)(Lua_Mob, uint32, uint32, uint32, uint32, uint32))&Lua_Client::QuestReward)
|
||||
.def("QuestReward", (void(Lua_Client::*)(Lua_Mob, uint32, uint32, uint32, uint32, uint32, uint32))&Lua_Client::QuestReward)
|
||||
.def("QuestReward", (void(Lua_Client::*)(Lua_Mob, uint32, uint32, uint32, uint32, uint32, uint32, bool))&Lua_Client::QuestReward)
|
||||
.def("QuestReward", (void(Lua_Client::*)(Lua_Mob, luabind::adl::object))&Lua_Client::QuestReward)
|
||||
.def("GetMoney", (uint32(Lua_Client::*)(uint8, uint8))&Lua_Client::GetMoney);
|
||||
}
|
||||
|
||||
|
||||
@ -296,6 +296,7 @@ public:
|
||||
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, uint32 itemid);
|
||||
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, uint32 itemid, uint32 exp);
|
||||
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, uint32 itemid, uint32 exp, bool faction);
|
||||
void QuestReward(Lua_Mob target, luabind::adl::object reward);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user