mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Fixed merchantlist probability.
NPCs were setting a singular chance value and each item was checking based on this value, making the probability field not a random chance per item. This removes the probability field from NPCs, SetMerchantProbability() and GetMerchantProbability() and makes the probability field truly random chance. Special thanks to ChaosSlayerZ for noticing the issue here: http://www.eqemulator.org/forums/showthread.php?t=41731
This commit is contained in:
@@ -488,16 +488,6 @@ void Lua_NPC::MerchantCloseShop() {
|
||||
self->MerchantCloseShop();
|
||||
}
|
||||
|
||||
void Lua_NPC::SetMerchantProbability(uint8 amt) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetMerchantProbability(amt);
|
||||
}
|
||||
|
||||
uint8 Lua_NPC::GetMerchantProbability() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetMerchantProbability();
|
||||
}
|
||||
|
||||
int Lua_NPC::GetRawAC() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetRawAC();
|
||||
@@ -608,8 +598,6 @@ luabind::scope lua_register_npc() {
|
||||
.def("GetScore", (int(Lua_NPC::*)(void))&Lua_NPC::GetScore)
|
||||
.def("MerchantOpenShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantOpenShop)
|
||||
.def("MerchantCloseShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantCloseShop)
|
||||
.def("SetMerchantProbability", (void(Lua_NPC::*)(void))&Lua_NPC::SetMerchantProbability)
|
||||
.def("GetMerchantProbability", (uint8(Lua_NPC::*)(void))&Lua_NPC::GetMerchantProbability)
|
||||
.def("GetRawAC", (int(Lua_NPC::*)(void))&Lua_NPC::GetRawAC)
|
||||
.def("GetAvoidanceRating", &Lua_NPC::GetAvoidanceRating);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user