forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNpcTemplate.cs
More file actions
119 lines (99 loc) · 4.31 KB
/
Copy pathNpcTemplate.cs
File metadata and controls
119 lines (99 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
using System.Collections.Generic;
using L2dotNET.Enums;
using L2dotNET.Utility;
namespace L2dotNET.Templates
{
public class NpcTemplate : CharTemplate
{
public int NpcId { get; set; }
public int IdTemplate { get; set; }
public string Type { get; set; }
public string Name { get; set; }
public string Title { get; set; }
public bool CantBeChampionMonster { get; set; }
public byte Level { get; set; }
public int Exp { get; set; }
public int Sp { get; set; }
public int RHand { get; set; }
public int LHand { get; set; }
public int EnchantEffect { get; set; }
public int CorpseTime { get; set; }
public double Hp { get; set; }
public double Mp { get; set; }
public int DropHerbGroup { get; set; }
public Race race = Race.Unknown;
public AiType AiType { get; set; }
public int SsCount { get; set; }
public int SsRate { get; set; }
public int SpsCount { get; set; }
public int SpsRate { get; set; }
public int AggroRange { get; set; }
public string[] Clans { get; set; }
public int ClanRange { get; set; }
public int[] IgnoredIds { get; set; }
public bool CanMove { get; set; }
public bool IsSeedable { get; set; }
//private List<L2Skill> _buffSkills = new ArrayList<>();
//private List<L2Skill> _debuffSkills = new ArrayList<>();
//private List<L2Skill> _healSkills = new ArrayList<>();
//private List<L2Skill> _longRangeSkills = new ArrayList<>();
//private List<L2Skill> _shortRangeSkills = new ArrayList<>();
//private List<L2Skill> _suicideSkills = new ArrayList<>();
//private List<DropCategory> _categories;
//private List<MinionData> _minions;
public List<ClassId> TeachInfo { get; }
//private Dictionary<int, L2Skill> _skills = new Dictionary<>();
//private Dictionary<EventType, List<Quest>> _questEvents = new Dictionary<>();
public NpcTemplate(StatsSet set) : base(set)
{
//Refactor this
TeachInfo = new List<ClassId>();
NpcId = set.GetInt("id");
IdTemplate = set.GetInt("idTemplate", NpcId);
Type = set.GetString("type");
Name = set.GetString("name");
Title = set.GetString("title", string.Empty);
CantBeChampionMonster = Title.EqualsIgnoreCase("Quest Monster");
Level = set.GetByte("level", 1);
Exp = set.GetInt("exp");
Sp = set.GetInt("sp");
RHand = set.GetInt("rHand");
LHand = set.GetInt("lHand");
EnchantEffect = set.GetInt("enchant");
CorpseTime = set.GetInt("corpseTime", 7);
Hp = set.GetDouble("hp");
Mp = set.GetDouble("mp");
DropHerbGroup = set.GetInt("dropHerbGroup");
//if (_dropHerbGroup > 0 && HerbDropTable.getInstance().getHerbDroplist(_dropHerbGroup) == null)
//{
// Log.warning($"Missing dropHerbGroup information for npcId: {_npcId}, dropHerbGroup: {_dropHerbGroup});
// _dropHerbGroup = 0;
//}
if (set.ContainsKey("raceId"))
race = (Race)set.GetInt("raceId");
//_aiType = set.GetEnumerator(new "aiType", AIType.DEFAULT);
SsCount = set.GetInt("ssCount");
SsRate = set.GetInt("ssRate");
SpsCount = set.GetInt("spsCount");
SpsRate = set.GetInt("spsRate");
AggroRange = set.GetInt("aggro");
if (set.ContainsKey("clan"))
{
Clans = set.GetStringArray("clan");
ClanRange = set.GetInt("clanRange");
if (set.ContainsKey("ignoredIds"))
IgnoredIds = set.GetIntegerArray("ignoredIds");
}
CanMove = set.GetBool("canMove", true);
IsSeedable = set.GetBool("seedable");
// _categories = set.getList("drops");
// _minions = set.getList("minions");
//if (set.containsKey("teachTo"))
//{
// for (int classId : set.getIntegerArray("teachTo"))
//addTeachInfo(ClassId.Values.classId]);
//}
//addSkills(set.getList("skills"));
}
}
}