diff --git a/data/scripts/#discord.lua b/data/scripts/#discord.lua deleted file mode 100644 index 8b137891..00000000 --- a/data/scripts/#discord.lua +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/damagemodifier.h b/src/damagemodifier.h index a0cee7e9..6c8c5b7f 100644 --- a/src/damagemodifier.h +++ b/src/damagemodifier.h @@ -119,7 +119,8 @@ enum ModifierDefenseType : uint8_t { DEFENSE_MODIFIER_RESIST, // damage reduction DEFENSE_MODIFIER_REFORM, // convert damage to another type - DEFENSE_MODIFIER_LAST + DEFENSE_MODIFIER_FIRST = DEFENSE_MODIFIER_NONE, + DEFENSE_MODIFIER_LAST = DEFENSE_MODIFIER_REFORM }; enum ModFactor : uint8_t { diff --git a/src/luascript.cpp b/src/luascript.cpp index da8dad8b..1f1e9450 100644 --- a/src/luascript.cpp +++ b/src/luascript.cpp @@ -1494,6 +1494,12 @@ void LuaScriptInterface::registerFunctions() registerEnum(CREATURETYPE_NPC) registerEnum(CREATURETYPE_SUMMON_OWN) registerEnum(CREATURETYPE_SUMMON_HOSTILE) + registerEnum(CREATURETYPE_SUMMON_GUILD) + registerEnum(CREATURETYPE_SUMMON_PARTY) + registerEnum(CREATURETYPE_BOSS) + registerEnum(CREATURETYPE_SUMMON_HOSTILE) + registerEnum(CREATURETYPE_ATTACKABLE) + registerEnum(CREATURETYPE_SUMMON_ALL) registerEnum(CLIENTOS_LINUX) registerEnum(CLIENTOS_WINDOWS) @@ -1985,6 +1991,32 @@ void LuaScriptInterface::registerFunctions() registerEnum(DiscordMessageType::MESSAGE_LOG); registerEnum(DiscordMessageType::MESSAGE_INFO); + // Attack Modifiers + registerEnum(ATTACK_MODIFIER_FIRST) + registerEnum(ATTACK_MODIFIER_NONE) + registerEnum(ATTACK_MODIFIER_LIFESTEAL) + registerEnum(ATTACK_MODIFIER_MANASTEAL) + registerEnum(ATTACK_MODIFIER_STAMINASTEAL) + registerEnum(ATTACK_MODIFIER_SOULSTEAL) + registerEnum(ATTACK_MODIFIER_CRITICAL) + registerEnum(ATTACK_MODIFIER_PIERCING) + registerEnum(ATTACK_MODIFIER_CONVERSION) + registerEnum(ATTACK_MODIFIER_LAST) + + // Defense Modifiers + registerEnum(DEFENSE_MODIFIER_FIRST) + registerEnum(DEFENSE_MODIFIER_NONE) + registerEnum(DEFENSE_MODIFIER_ABSORB) + registerEnum(DEFENSE_MODIFIER_RESTORE) + registerEnum(DEFENSE_MODIFIER_REPLENISH) + registerEnum(DEFENSE_MODIFIER_REVIVE) + registerEnum(DEFENSE_MODIFIER_REFLECT) + registerEnum(DEFENSE_MODIFIER_DEFLECT) + registerEnum(DEFENSE_MODIFIER_RICOCHET) + registerEnum(DEFENSE_MODIFIER_RESIST) + registerEnum(DEFENSE_MODIFIER_RESIST) + registerEnum(DEFENSE_MODIFIER_LAST) + // _G registerGlobalVariable("INDEX_WHEREEVER", INDEX_WHEREEVER); registerGlobalBoolean("VIRTUAL_PARENT", true); diff --git a/src/player.cpp b/src/player.cpp index dad47dc8..59b04eff 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -6016,7 +6016,7 @@ std::unordered_map Player::getDefenseModifierTotals(con modMap.reserve(DEFENSE_MODIFIER_LAST); auto defenseMods = getDefenseModifiers(); - for (uint8_t i = DEFENSE_MODIFIER_NONE; i < DEFENSE_MODIFIER_LAST; ++i) { + for (uint8_t i = DEFENSE_MODIFIER_FIRST; i < DEFENSE_MODIFIER_LAST; ++i) { auto modTotals = getValidatedTotals(defenseMods[i], damageType, originType, creatureType, race, creatureName); modMap.try_emplace(i, modTotals); }