mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 15:58:36 +00:00
[Lua] Add UpdatePersonalFaction Lua Mod (#4279)
* Add UpdatePersonalFaction lua mod * Fix typo * Fix value typo
This commit is contained in:
@@ -7563,6 +7563,16 @@ void Client::SetFactionLevel(
|
||||
current_value = GetCharacterFactionLevel(e.faction_id);
|
||||
faction_before = current_value;
|
||||
|
||||
#ifdef LUA_EQEMU
|
||||
int32 lua_ret = 0;
|
||||
bool ignore_default = false;
|
||||
lua_ret = LuaParser::Instance()->UpdatePersonalFaction(this, e.value, e.faction_id, current_value, e.temp, faction_minimum, faction_maximum, ignore_default);
|
||||
|
||||
if (ignore_default) {
|
||||
e.value = lua_ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
UpdatePersonalFaction(
|
||||
character_id,
|
||||
e.value,
|
||||
@@ -7618,6 +7628,16 @@ void Client::SetFactionLevel2(uint32 char_id, int32 faction_id, uint8 char_class
|
||||
current_value = GetCharacterFactionLevel(faction_id);
|
||||
faction_before_hit = current_value;
|
||||
|
||||
#ifdef LUA_EQEMU
|
||||
int32 lua_ret = 0;
|
||||
bool ignore_default = false;
|
||||
lua_ret = LuaParser::Instance()->UpdatePersonalFaction(this, value, faction_id, current_value, temp, this_faction_min, this_faction_max, ignore_default);
|
||||
|
||||
if (ignore_default) {
|
||||
value = lua_ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
UpdatePersonalFaction(char_id, value, faction_id, ¤t_value, temp, this_faction_min, this_faction_max);
|
||||
|
||||
//Message(Chat::Lime, "Min(%d) Max(%d) Before(%d), After(%d)\n", this_faction_min, this_faction_max, faction_before_hit, current_value);
|
||||
|
||||
Reference in New Issue
Block a user