diff --git a/scripts/enum/mod.lua b/scripts/enum/mod.lua index 174f877c16f..3b17a72b950 100644 --- a/scripts/enum/mod.lua +++ b/scripts/enum/mod.lua @@ -122,9 +122,9 @@ xi.mod = CAMOUFLAGE_DURATION = 98, -- Camouflage duration in percents -- These are NOT item Level skill, they are skill in your status menu. iLvl "skill" happens in item_weapon.sql - AUTO_MELEE_SKILL = 101, - AUTO_RANGED_SKILL = 102, - AUTO_MAGIC_SKILL = 103, + AUTO_MELEE_SKILL = 101, -- Do not apply to items in item_mods_pet.sql, apply only to master (it does not work properly on pet mods) + AUTO_RANGED_SKILL = 102, -- Do not apply to items in item_mods_pet.sql, apply only to master (it does not work properly on pet mods) + AUTO_MAGIC_SKILL = 103, -- Do not apply to items in item_mods_pet.sql, apply only to master (it does not work properly on pet mods) ARCHERY = 104, MARKSMAN = 105, THROW = 106, diff --git a/scripts/globals/automatonweaponskills.lua b/scripts/globals/automatonweaponskills.lua index 08fbf3845f3..201ef71d4ee 100644 --- a/scripts/globals/automatonweaponskills.lua +++ b/scripts/globals/automatonweaponskills.lua @@ -214,6 +214,7 @@ xi.autows.doAutoPhysicalWeaponskill = function(attacker, target, wsID, tp, prima calcParams.bonusAcc = 0 + attacker:getMod(xi.mod.WSACC) calcParams.hitRate = getAutoHitRate(attacker, target, false, calcParams.bonusAcc, calcParams.melee) calcParams.skillType = attack.weaponType + calcParams.tpUsed = tp -- Send our wsParams off to calculate our raw WS damage, hits landed, and shadows absorbed calcParams = xi.weaponskills.calculateRawWSDmg(attacker, target, wsID, tp, action, wsParams, calcParams) @@ -295,7 +296,8 @@ xi.autows.doAutoRangedWeaponskill = function(attacker, target, wsID, wsParams, t bonusWSmods = math.max(attacker:getMainLvl() - target:getMainLvl(), 0), bonusTP = wsParams.bonusTP or 0, bonusfTP = flameHolderFTP or 0, - bonusAcc = 0 + attacker:getMod(xi.mod.WSACC) + bonusAcc = 0 + attacker:getMod(xi.mod.WSACC), + tpUsed = tp, } calcParams.hitRate = getAutoHitRate(attacker, target, false, calcParams.bonusAcc, calcParams.melee) calcParams.skillType = attack.weaponType diff --git a/sql/item_mods_pet.sql b/sql/item_mods_pet.sql index 16a13d1e060..328efa1b480 100644 --- a/sql/item_mods_pet.sql +++ b/sql/item_mods_pet.sql @@ -149,9 +149,6 @@ INSERT INTO `item_mods_pet` VALUES (11497,384,500,0); -- All Pets - HASTE_GEAR: -- Fidelity Mantle INSERT INTO `item_mods_pet` VALUES (11531,73,3,0); -- All Pets - STORETP: 3 --- Wayang Kulit Mantle -INSERT INTO `item_mods_pet` VALUES (11536,101,2,3); -- Automaton - AUTO_MELEE_SKILL: 2 - -- Ferine Mantle INSERT INTO `item_mods_pet` VALUES (11555,25,10,0); -- All Pets - ACC: 10 diff --git a/src/map/modifier.h b/src/map/modifier.h index fd60b136594..aa03fc535c1 100644 --- a/src/map/modifier.h +++ b/src/map/modifier.h @@ -136,9 +136,9 @@ enum class Mod GKATANA = 89, // Great Katana Skill CLUB = 90, // Club Skill STAFF = 91, // Staff Skill - AUTO_MELEE_SKILL = 101, // Automaton Melee Skill - AUTO_RANGED_SKILL = 102, // Automaton Range Skill - AUTO_MAGIC_SKILL = 103, // Automaton Magic Skill + AUTO_MELEE_SKILL = 101, // Automaton Melee Skill -- Do not apply to items in item_mods_pet.sql, apply only to master (it does not work properly on pet mods) + AUTO_RANGED_SKILL = 102, // Automaton Range Skill -- Do not apply to items in item_mods_pet.sql, apply only to master (it does not work properly on pet mods) + AUTO_MAGIC_SKILL = 103, // Automaton Magic Skill -- Do not apply to items in item_mods_pet.sql, apply only to master (it does not work properly on pet mods) ARCHERY = 104, // Archery Skill MARKSMAN = 105, // Marksman Skill THROW = 106, // Throw Skill diff --git a/src/map/utils/puppetutils.cpp b/src/map/utils/puppetutils.cpp index f4473b6a740..f7818e243d8 100644 --- a/src/map/utils/puppetutils.cpp +++ b/src/map/utils/puppetutils.cpp @@ -52,6 +52,11 @@ namespace puppetutils { PChar->automatonInfo.m_automatonName = rset->get("name"); + if (PChar->automatonInfo.m_automatonName.empty()) + { + PChar->automatonInfo.m_automatonName = "Automaton"; + } + automaton_equip_t tempEquip; db::extractFromBlob(rset, "equipped_attachments", tempEquip); @@ -62,8 +67,6 @@ namespace puppetutils tempEquip.Frame < FRAME_HARLEQUIN || tempEquip.Frame > FRAME_STORMWAKER) { - PChar->PPet->name = "Automaton"; - PChar->setAutomatonHead(HEAD_HARLEQUIN); tempEquip.Head = HEAD_HARLEQUIN; PChar->setAutomatonFrame(FRAME_HARLEQUIN);