|
|
@ -247,30 +247,30 @@ public enum NPCManager { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void applyGuardStanceModifiers(Mob guard){ |
|
|
|
public static void applyGuardStanceModifiers(Mob guard) { |
|
|
|
float damageModifier = 1; |
|
|
|
float damageModifier = 1; |
|
|
|
float attackRatingModifier = 1; |
|
|
|
float attackRatingModifier = 1; |
|
|
|
float defenseModifier = 1; |
|
|
|
float defenseModifier = 1; |
|
|
|
float attackSpeedModifier = 1; |
|
|
|
float attackSpeedModifier = 1; |
|
|
|
float powerDamageModifier = 1; |
|
|
|
float powerDamageModifier = 1; |
|
|
|
//handle stance modifiers for guard mob
|
|
|
|
//handle stance modifiers for guard mob
|
|
|
|
if(guard.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)){ |
|
|
|
if (guard.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)) { |
|
|
|
//apply rogue bonuses
|
|
|
|
//apply rogue bonuses
|
|
|
|
attackRatingModifier += 0.5f; |
|
|
|
attackRatingModifier += 0.5f; |
|
|
|
defenseModifier += 0.5f; |
|
|
|
defenseModifier += 0.5f; |
|
|
|
damageModifier += 0.5f; |
|
|
|
damageModifier += 0.5f; |
|
|
|
attackSpeedModifier -= 0.36f; |
|
|
|
attackSpeedModifier -= 0.36f; |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
Integer contractID; |
|
|
|
Integer contractID; |
|
|
|
if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) { |
|
|
|
if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) { |
|
|
|
contractID = guard.guardCaptain.contract.getContractID(); |
|
|
|
contractID = guard.guardCaptain.contract.getContractID(); |
|
|
|
} else{ |
|
|
|
} else { |
|
|
|
contractID = guard.contract.getContractID(); |
|
|
|
contractID = guard.contract.getContractID(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (Enum.MinionType.ContractToMinionMap.get(contractID) != null && Enum.MinionType.ContractToMinionMap.get(contractID).isMage()){ |
|
|
|
if (Enum.MinionType.ContractToMinionMap.get(contractID) != null && Enum.MinionType.ContractToMinionMap.get(contractID).isMage()) { |
|
|
|
//apply mage offensive Stance
|
|
|
|
//apply mage offensive Stance
|
|
|
|
powerDamageModifier += 0.5f; |
|
|
|
powerDamageModifier += 0.5f; |
|
|
|
} else{ |
|
|
|
} else { |
|
|
|
//apply fighter offensive stance
|
|
|
|
//apply fighter offensive stance
|
|
|
|
damageModifier += 0.5f; |
|
|
|
damageModifier += 0.5f; |
|
|
|
attackSpeedModifier -= 0.36f; |
|
|
|
attackSpeedModifier -= 0.36f; |
|
|
@ -289,7 +289,7 @@ public enum NPCManager { |
|
|
|
//TODO figure out how to apply +50% powerdamage to mage guards
|
|
|
|
//TODO figure out how to apply +50% powerdamage to mage guards
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void setDamageAndSpeedForGuard(Mob guard){ |
|
|
|
public static void setDamageAndSpeedForGuard(Mob guard) { |
|
|
|
|
|
|
|
|
|
|
|
float rankModifier = 1 + (guard.getRank() * 0.1f); |
|
|
|
float rankModifier = 1 + (guard.getRank() * 0.1f); |
|
|
|
int primaryStat = 0; |
|
|
|
int primaryStat = 0; |
|
|
@ -324,17 +324,17 @@ public enum NPCManager { |
|
|
|
guard.rangeHandOne = weapon.template.item_weapon_max_range; |
|
|
|
guard.rangeHandOne = weapon.template.item_weapon_max_range; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin()) * rankModifier) + primaryStat; |
|
|
|
guard.minDamageHandOne = (int) ((guard.mobBase.getDamageMin()) * rankModifier) + primaryStat; |
|
|
|
guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax()) * rankModifier) + primaryStat; |
|
|
|
guard.maxDamageHandOne = (int) ((guard.mobBase.getDamageMax()) * rankModifier) + primaryStat; |
|
|
|
guard.speedHandOne = 30.0f; |
|
|
|
guard.speedHandOne = 30.0f; |
|
|
|
guard.rangeHandOne = 3; |
|
|
|
guard.rangeHandOne = 3; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void setDefenseForGuard(Mob guard){ |
|
|
|
public static void setDefenseForGuard(Mob guard) { |
|
|
|
int dexterity = guard.getStatDexCurrent(); |
|
|
|
int dexterity = guard.getStatDexCurrent(); |
|
|
|
if(dexterity < 1) |
|
|
|
if (dexterity < 1) |
|
|
|
dexterity = 1; |
|
|
|
dexterity = 1; |
|
|
|
int baseDef = guard.mobBase.getDefenseRating(); |
|
|
|
int baseDef = guard.mobBase.getDefenseRating(); |
|
|
|
int armorDefense = 0; |
|
|
|
int armorDefense = 0; |
|
|
@ -355,9 +355,9 @@ public enum NPCManager { |
|
|
|
guard.atrHandOne = baseAtr; |
|
|
|
guard.atrHandOne = baseAtr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void setMaxHealthForGuard(Mob guard){ |
|
|
|
public static void setMaxHealthForGuard(Mob guard) { |
|
|
|
//values derived fom reading memory address for health on client when selecting player guards
|
|
|
|
//values derived fom reading memory address for health on client when selecting player guards
|
|
|
|
switch(guard.getRank()){ |
|
|
|
switch (guard.getRank()) { |
|
|
|
default: |
|
|
|
default: |
|
|
|
guard.healthMax = 750; //rank 1
|
|
|
|
guard.healthMax = 750; //rank 1
|
|
|
|
break; |
|
|
|
break; |
|
|
@ -422,7 +422,7 @@ public enum NPCManager { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void applyEquipmentResists(Mob mob){ |
|
|
|
public static void applyEquipmentResists(Mob mob) { |
|
|
|
|
|
|
|
|
|
|
|
if (mob.charItemManager.equipped.isEmpty()) |
|
|
|
if (mob.charItemManager.equipped.isEmpty()) |
|
|
|
return; |
|
|
|
return; |
|
|
@ -438,18 +438,18 @@ public enum NPCManager { |
|
|
|
|
|
|
|
|
|
|
|
public static void applyMobbaseSkill(Mob mob) { |
|
|
|
public static void applyMobbaseSkill(Mob mob) { |
|
|
|
SkillsBase baseSkill = DbManager.SkillsBaseQueries.GET_BASE_BY_TOKEN(mob.mobBase.getMobBaseStats().getBaseSkill()); |
|
|
|
SkillsBase baseSkill = DbManager.SkillsBaseQueries.GET_BASE_BY_TOKEN(mob.mobBase.getMobBaseStats().getBaseSkill()); |
|
|
|
if(baseSkill != null) |
|
|
|
if (baseSkill != null) |
|
|
|
mob.getSkills().put(baseSkill.getName(),new CharacterSkill(baseSkill,mob,mob.mobBase.getMobBaseStats().getBaseSkillAmount())); |
|
|
|
mob.getSkills().put(baseSkill.getName(), new CharacterSkill(baseSkill, mob, mob.mobBase.getMobBaseStats().getBaseSkillAmount())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void applyRuneSkills(Mob mob, int runeID){ |
|
|
|
public static void applyRuneSkills(Mob mob, int runeID) { |
|
|
|
//load mob skill adjustments from mobbase rune
|
|
|
|
//load mob skill adjustments from mobbase rune
|
|
|
|
if(PowersManager._allRuneSkillAdjusts.containsKey(runeID)) |
|
|
|
if (PowersManager._allRuneSkillAdjusts.containsKey(runeID)) |
|
|
|
for(RuneSkillAdjustEntry entry : PowersManager._allRuneSkillAdjusts.get(runeID)) { |
|
|
|
for (RuneSkillAdjustEntry entry : PowersManager._allRuneSkillAdjusts.get(runeID)) { |
|
|
|
if(SkillsBase.getFromCache(entry.skill_type) == null) |
|
|
|
if (SkillsBase.getFromCache(entry.skill_type) == null) |
|
|
|
SkillsBase.putInCache(DbManager.SkillsBaseQueries.GET_BASE_BY_NAME(entry.skill_type)); |
|
|
|
SkillsBase.putInCache(DbManager.SkillsBaseQueries.GET_BASE_BY_NAME(entry.skill_type)); |
|
|
|
SkillsBase skillBase = SkillsBase.getFromCache(entry.skill_type); |
|
|
|
SkillsBase skillBase = SkillsBase.getFromCache(entry.skill_type); |
|
|
|
if(skillBase == null) |
|
|
|
if (skillBase == null) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
if (entry.level <= mob.level) |
|
|
|
if (entry.level <= mob.level) |
|
|
|
if (mob.skills.containsKey(entry.name) == false) |
|
|
|
if (mob.skills.containsKey(entry.name) == false) |
|
|
@ -459,15 +459,15 @@ public enum NPCManager { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void applyRunesForNPC(NPC npc){ |
|
|
|
public static void applyRunesForNPC(NPC npc) { |
|
|
|
npc.runes = new ArrayList<>(); |
|
|
|
npc.runes = new ArrayList<>(); |
|
|
|
RuneBase shopkeeperBase = RuneBase.getRuneBase(252620); |
|
|
|
RuneBase shopkeeperBase = RuneBase.getRuneBase(252620); |
|
|
|
CharacterRune shopkeeper = new CharacterRune(shopkeeperBase,npc.getObjectUUID()); |
|
|
|
CharacterRune shopkeeper = new CharacterRune(shopkeeperBase, npc.getObjectUUID()); |
|
|
|
npc.runes.add(shopkeeper); |
|
|
|
npc.runes.add(shopkeeper); |
|
|
|
if(NPCManager._runeSetMap.containsKey(npc.runeSetID)) { |
|
|
|
if (NPCManager._runeSetMap.containsKey(npc.runeSetID)) { |
|
|
|
for (int runeID : _runeSetMap.get(npc.runeSetID)) { |
|
|
|
for (int runeID : _runeSetMap.get(npc.runeSetID)) { |
|
|
|
RuneBase rb = RuneBase.getRuneBase(runeID); |
|
|
|
RuneBase rb = RuneBase.getRuneBase(runeID); |
|
|
|
if(rb != null) { |
|
|
|
if (rb != null) { |
|
|
|
CharacterRune toApply = new CharacterRune(rb, npc.getObjectUUID()); |
|
|
|
CharacterRune toApply = new CharacterRune(rb, npc.getObjectUUID()); |
|
|
|
npc.runes.add(toApply); |
|
|
|
npc.runes.add(toApply); |
|
|
|
} |
|
|
|
} |
|
|
|