Added exp and leveling functions, redid equip ability functions to allow adding abilities that aren't for the player's current class and made functions more clear, added dictionary of BattleCommand ids indexed by a tuple containing classId and level.

This commit is contained in:
yogurt 2017-09-27 18:10:22 -05:00
parent 56491266cc
commit 33f8709d76
7 changed files with 333 additions and 30 deletions

View file

@ -40,6 +40,7 @@ namespace FFXIVClassic_Map_Server
private Dictionary<ulong, Party> currentPlayerParties = new Dictionary<ulong, Party>(); //GroupId, Party object
private Dictionary<uint, StatusEffect> statusEffectList = new Dictionary<uint, StatusEffect>();
private Dictionary<ushort, BattleCommand> battleCommandList = new Dictionary<ushort, BattleCommand>();
private Dictionary<Tuple<byte, short>, uint> battleCommandIdByLevel = new Dictionary<Tuple<byte, short>, uint>();//Holds battle command ids keyed by class id and level (in that order)
private Dictionary<uint, ModifierList> battleNpcGenusMods = new Dictionary<uint, ModifierList>();
private Dictionary<uint, ModifierList> battleNpcPoolMods = new Dictionary<uint, ModifierList>();
private Dictionary<uint, ModifierList> battleNpcSpawnMods = new Dictionary<uint, ModifierList>();
@ -1422,7 +1423,7 @@ namespace FFXIVClassic_Map_Server
public void LoadBattleCommands()
{
battleCommandList = Database.LoadGlobalBattleCommandList();
Database.LoadGlobalBattleCommandList(battleCommandList, battleCommandIdByLevel);
}
public BattleCommand GetBattleCommand(uint id)
@ -1430,5 +1431,11 @@ namespace FFXIVClassic_Map_Server
BattleCommand battleCommand;
return battleCommandList.TryGetValue((ushort)id, out battleCommand) ? battleCommand.Clone() : null;
}
public uint GetBattleCommandIdByLevel(byte classId, short level)
{
uint id = 0;
return battleCommandIdByLevel.TryGetValue(Tuple.Create(classId, level), out id) ? id : 0;
}
}
}