public override string ToString() { string alwaysDroppedItems = ""; if (AlwaysDroppedItemIDs != null) { alwaysDroppedItems = "[" + string.Join(",", AlwaysDroppedItemIDs) + "]"; } string output = "<NpcModel>{" + ", " + "ID: " + ID + ", " + "Name: " + Name + ", " + "NpcRole: " + NpcRole.ToString() + ", " + "NpcRace: " + NpcRace.ToString() + ", " + "NpcSize: " + NpcSize.ToString() + ", " + "RarityType: " + RarityType.ToString() + ", " + "CombatantModel: " + CombatantModel.ToString() + ", " + "AlwaysDroppedItemIDs: " + alwaysDroppedItems + "}"; return(output); }
private ServerNpcModel buildRandomNPC(int npcLevel, int npcTeamID, RarityType minRarityType, RarityType maxRarityType) { RarityType npcRarity = RarityConstants.GetRandomRarityRange(minRarityType, maxRarityType); NpcRole npcRole = (NpcRole)RandomGen.GetIntRange(0, NumNpcRoles - 1); NpcRace npcRace = (NpcRace)RandomGen.GetIntRange(0, NumNpcRaces - 1); NpcSize npcSize = (NpcSize)RandomGen.GetIntRange(0, NumNpcSizes - 1); // TODO: determine better naming scheme. For now just join Size+Race+Role; string npcName = npcSize.ToString() + " " + npcRace.ToString() + " " + npcRole.ToString(); // Build combatant model AbilityItemModel[] randomAbilities = getRandomNPCAbilities((int)npcRarity + 1, npcLevel); CombatantModel combatantModel = BuildCombatantSCMD.Execute(npcLevel, npcTeamID, randomAbilities, npcRarity); // TODO: determine behaviour based on role. For now use default CombatBehaviourBase combatBehaviour = new AbilityCycleBehaviour(); ServerNpcModel serverNpcModel = new ServerNpcModel(combatBehaviour, "", npcName, npcRole, npcRace, npcSize, npcRarity, combatantModel); DetermineNPCDropTableSCMD.Execute(serverNpcModel); return(serverNpcModel); }