/
MasteryInfo.cs
641 lines (521 loc) · 23.9 KB
/
MasteryInfo.cs
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
using Server;
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Items;
using Server.Mobiles;
using System.Linq;
namespace Server.Spells.SkillMasteries
{
public enum Volume
{
None,
One,
Two,
Three
}
public enum PassiveSpell
{
None,
EnchantedSummoning,
Intuition,
SavingThrow,
Potency,
Knockout,
Boarding,
AnticipateHit
}
public class MasteryInfo
{
public static readonly int MinSkillRequirement = 90;
public static void Configure()
{
Infos = new List<MasteryInfo>();
EventSink.Login += new LoginEventHandler(OnLogin);
Infos.Add(new MasteryInfo(typeof(SkillMasteries.InspireSpell), 700, SkillName.Provocation));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.InvigorateSpell), 701, SkillName.Provocation));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ResilienceSpell), 702, SkillName.Peacemaking));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.PerseveranceSpell), 703, SkillName.Peacemaking));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.TribulationSpell), 704, SkillName.Discordance));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.DespairSpell), 705, SkillName.Discordance));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.DeathRaySpell), 706, SkillName.Magery));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.EtherealBurstSpell), 707, SkillName.Magery));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.NetherBlastSpell), 708, SkillName.Mysticism));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.MysticWeaponSpell), 709, SkillName.Mysticism));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.CommandUndeadSpell), 710, SkillName.Necromancy));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ConduitSpell), 711, SkillName.Necromancy));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ManaShieldSpell), 712, SkillName.Spellweaving));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.SummonReaperSpell), 713, SkillName.Spellweaving));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.WarcrySpell), 716, SkillName.Bushido));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.RejuvinateSpell), 718, SkillName.Chivalry));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.HolyFistSpell), 719, SkillName.Chivalry));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ShadowSpell), 720, SkillName.Ninjitsu));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.WhiteTigerFormSpell), 721, SkillName.Ninjitsu));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.FlamingShotSpell), 722, SkillName.Archery));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.PlayingTheOddsSpell), 723, SkillName.Archery));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ThrustSpell), 724, SkillName.Fencing));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.PierceSpell), 725, SkillName.Fencing));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.StaggerSpell), 726, SkillName.Macing));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ToughnessSpell), 727, SkillName.Macing));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.OnslaughtSpell), 728, SkillName.Swords));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.FocusedEyeSpell), 729, SkillName.Swords));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ElementalFurySpell), 730, SkillName.Throwing));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.CalledShotSpell), 731, SkillName.Throwing));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ShieldBashSpell), 733, SkillName.Parry));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.BodyGuardSpell), 734, SkillName.Parry));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.HeightenedSensesSpell), 735, SkillName.Parry));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.ToleranceSpell), 736, SkillName.Poisoning));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.InjectedStrikeSpell), 737, SkillName.Poisoning));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.RampageSpell), 739, SkillName.Wrestling));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.FistsOfFurySpell), 740, SkillName.Wrestling));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.WhisperingSpell), 742, SkillName.AnimalTaming));
Infos.Add(new MasteryInfo(typeof(SkillMasteries.CombatTrainingSpell), 743, SkillName.AnimalTaming));
//Passive Masteries
Infos.Add(new MasteryInfo(null, 714, SkillName.Magery, PassiveSpell.EnchantedSummoning)); // Enchanted Summoning
Infos.Add(new MasteryInfo(null, 714, SkillName.Necromancy, PassiveSpell.EnchantedSummoning)); // Enchanted Summoning
Infos.Add(new MasteryInfo(null, 714, SkillName.Spellweaving, PassiveSpell.EnchantedSummoning)); // Enchanted Summoning
Infos.Add(new MasteryInfo(null, 714, SkillName.Mysticism, PassiveSpell.EnchantedSummoning)); // Enchanted Summoning
Infos.Add(new MasteryInfo(null, 715, SkillName.Bushido, PassiveSpell.AnticipateHit)); // Anticipate Hit
Infos.Add(new MasteryInfo(null, 717, SkillName.Bushido, PassiveSpell.Intuition)); // Intuition
Infos.Add(new MasteryInfo(null, 717, SkillName.Ninjitsu, PassiveSpell.Intuition)); // Intuition
Infos.Add(new MasteryInfo(null, 717, SkillName.Chivalry, PassiveSpell.Intuition)); // Intuition
Infos.Add(new MasteryInfo(null, 732, SkillName.Archery, PassiveSpell.SavingThrow)); // Saving Throw
Infos.Add(new MasteryInfo(null, 732, SkillName.Fencing, PassiveSpell.SavingThrow)); // Saving Throw
Infos.Add(new MasteryInfo(null, 732, SkillName.Swords, PassiveSpell.SavingThrow)); // Saving Throw
Infos.Add(new MasteryInfo(null, 732, SkillName.Macing, PassiveSpell.SavingThrow)); // Saving Throw
Infos.Add(new MasteryInfo(null, 732, SkillName.Throwing, PassiveSpell.SavingThrow)); // Saving Throw
Infos.Add(new MasteryInfo(null, 738, SkillName.Poisoning, PassiveSpell.Potency)); // Potency
Infos.Add(new MasteryInfo(null, 741, SkillName.Wrestling, PassiveSpell.Knockout)); // Knockout
Infos.Add(new MasteryInfo(null, 744, SkillName.AnimalTaming, PassiveSpell.Boarding)); // Boarding
}
public static List<MasteryInfo> Infos { get; set; }
public Type SpellType { get; set; }
public int SpellID { get; set; }
public SkillName MasterySkill { get; set; }
public int NameLocalization { get; set; }
public bool Passive { get { return PassiveSpell != PassiveSpell.None; } }
public PassiveSpell PassiveSpell { get; set; }
public MasteryInfo(Type skillType, int spellID, SkillName masterySkill, PassiveSpell passive = PassiveSpell.None)
{
SpellType = skillType;
SpellID = spellID;
MasterySkill = masterySkill;
PassiveSpell = passive;
NameLocalization = GetLocalization(masterySkill);
}
public static MasteryInfo GetInfo(Type spell, SkillName skill)
{
return Infos.FirstOrDefault(info => info.SpellType == spell && info.MasterySkill == skill);
}
public static MasteryInfo GetInfo(int spellID)
{
return Infos.FirstOrDefault(info => info.SpellID == spellID);
}
public static MasteryInfo GetInfo(int spellID, SkillName name)
{
return Infos.FirstOrDefault(info => info.SpellID == spellID && info.MasterySkill == name);
}
/// <summary>
/// Obsolete, used to serialize old types
/// </summary>
/// <param name="spellID"></param>
/// <param name="skill"></param>
/// <returns></returns>
public static int GetVolume(int spellID, SkillName skill)
{
if (IsPassiveMastery(spellID) || spellID == 733)
return 1;
else if (spellID <= 715)
{
if (spellID % 2 == 0)
return 3;
return 2;
}
else if (spellID <= 731 || (spellID >= 736 && spellID <= 743))
{
if (spellID % 2 == 0)
return 2;
return 3;
}
else if (spellID == 734)
return 2;
else if (spellID == 735)
return 3;
return 1;
}
public static SkillName GetSkillForID(int spellID)
{
MasteryInfo info = GetInfo(spellID);
if (info != null)
return info.MasterySkill;
return SkillName.Archery;
}
public static bool HasLearned(Mobile m, SkillName skill)
{
return m.Skills[skill].HasLearnedMastery();
}
public static bool HasLearned(Mobile m, SkillName skill, int volume)
{
return m.Skills[skill].HasLearnedVolume(volume);
}
public static bool HasLearned(Mobile m, Type spell, SkillName skill)
{
MasteryInfo info = GetInfo(spell, skill);
return info != null && m.Skills[info.MasterySkill].HasLearnedMastery();
}
public static int GetMasteryLevel(Mobile m, SkillName name)
{
return m.Skills[name].VolumeLearned;
}
public static bool CanLearn(Mobile m, int spellID, SkillName skill)
{
MasteryInfo info = GetInfo(spellID, skill);
if (info != null)
{
return m.Skills[info.MasterySkill].Base >= MinSkillRequirement;
}
return false;
}
public static bool LearnMastery(Mobile m, SkillName skill, int volume)
{
if (GetMasteryLevel(m, skill) < volume)
{
m.Skills[skill].LearnMastery((int)volume);
return true;
}
return false;
}
public static bool IsPassiveMastery(int spellID)
{
return spellID == 714 || spellID == 715 || spellID == 716 || spellID == 732 || spellID == 738 || spellID == 741 || spellID == 744;
}
public static void OnMasteryChanged(Mobile m, SkillName oldMastery)
{
PassiveSpell passive = GetActivePassive(m);
SkillName newMastery = m.Skills.CurrentMastery;
if (oldMastery != newMastery)
{
List<SkillMasterySpell> list = SkillMasterySpell.GetSpells(m);
if (list != null)
{
list.ForEach(spell =>
{
spell.Expire();
});
list.Clear();
list.TrimExcess();
}
SpecialMove move = SpecialMove.GetCurrentMove(m);
if(move is SkillMasteryMove)
SpecialMove.ClearCurrentMove(m);
m.RemoveStatMod("SavingThrow_Str");
ColUtility.Free(list);
RemovePassiveBuffs(m);
}
if (passive != PassiveSpell.None && passive != PassiveSpell.AnticipateHit)
{
switch (passive)
{
case PassiveSpell.EnchantedSummoning:
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.EnchantedSummoning, 1155904, 1156090, String.Format("{0}\t{0}", EnchantedSummoningBonus(m).ToString()), true)); // +~1_STAMINA~ Stamina Regeneration and +~2_HP~% Hit Points for summoned pets.<br>Increased difficulty for summoned pets to be dispelled.
break;
case PassiveSpell.Intuition:
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Intuition, 1155907, 1156089, IntuitionBonus(m).ToString(), true)); // Mana Increase ~1_VAL~
break;
case PassiveSpell.SavingThrow:
{
string args = null;
switch (GetMasteryLevel(m, newMastery))
{
default: args = "5\t0\t0\t0"; break;
case 2: args = "5\t5\t0\t0"; break;
case 3: args = "5\t5\t5\t5"; break;
}
m.AddStatMod(new StatMod(StatType.Str, "SavingThrow_Str", 5, TimeSpan.Zero));
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.SavingThrow, 1156031, 1156032, args, true)); // Provides a chance to block disarm attempts based on Mastery level, weapon skill level and tactics skill level.
}
break;
case PassiveSpell.Potency:
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Potency, 1155928, 1156195, NonPoisonConsumeChance(m).ToString(), true)); // ~1_VAL~% chance to not consume poison charges when using infecting strike or injected strike.
break;
case PassiveSpell.Knockout:
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Knockout, 1155931, 1156030, String.Format("{0}\t{1}", GetKnockoutModifier(m).ToString(), GetKnockoutModifier(m, true).ToString(), true))); // Wrestling Damage Bonus:<br>+~1_VAL~% PvM<br>+~2_VAL~% PvP
break;
case PassiveSpell.Boarding:
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Boarding, 1155934, 1156194, BoardingSlotIncrease(m).ToString(), true)); // Your number of stable slots has been increased by ~1_VAL~.
break;
}
m.Delta(MobileDelta.WeaponDamage);
m.UpdateResistances();
if (m.Mana > m.ManaMax)
m.Mana = m.ManaMax;
}
if (m.Backpack != null)
{
foreach (Item item in m.Backpack.FindItemsByType(typeof(BookOfMasteries)))
{
BookOfMasteries book = item as BookOfMasteries;
if (book != null)
book.InvalidateProperties();
}
}
foreach (Item item in m.Items.Where(i => i is BookOfMasteries))
{
BookOfMasteries book = item as BookOfMasteries;
if (book != null)
book.InvalidateProperties();
}
}
public static PassiveSpell GetActivePassive(Mobile m)
{
if (m == null || m.Skills == null || Infos == null)
return PassiveSpell.None;
SkillName mastery = m.Skills.CurrentMastery;
MasteryInfo info = Infos.FirstOrDefault(i => i.Passive && i.MasterySkill == mastery && i.PassiveSpell != PassiveSpell.AnticipateHit);
if (info != null)
return info.PassiveSpell;
return PassiveSpell.None;
}
public static bool IsActivePassive(Mobile m, PassiveSpell spell)
{
if (spell == PassiveSpell.AnticipateHit)
return m.Skills.CurrentMastery == SkillName.Bushido;
return GetActivePassive(m) == spell;
}
public static void RemovePassiveBuffs(Mobile m)
{
BuffInfo.RemoveBuff(m, BuffIcon.EnchantedSummoning);
BuffInfo.RemoveBuff(m, BuffIcon.AnticipateHit);
BuffInfo.RemoveBuff(m, BuffIcon.Intuition);
BuffInfo.RemoveBuff(m, BuffIcon.SavingThrow);
BuffInfo.RemoveBuff(m, BuffIcon.Potency);
BuffInfo.RemoveBuff(m, BuffIcon.Knockout);
BuffInfo.RemoveBuff(m, BuffIcon.Boarding);
}
public static void OnLogin(LoginEventArgs e)
{
Mobile m = e.Mobile;
if ((int)m.Skills.CurrentMastery > 0)
OnMasteryChanged(m, m.Skills.CurrentMastery);
}
public static int GetSpellID(PassiveSpell spell)
{
switch (spell)
{
case PassiveSpell.EnchantedSummoning: return 714;
case PassiveSpell.AnticipateHit: return 715;
case PassiveSpell.Intuition: return 717;
case PassiveSpell.SavingThrow: return 732;
case PassiveSpell.Potency: return 738;
case PassiveSpell.Knockout: return 741;
case PassiveSpell.Boarding: return 744;
}
return -1;
}
public static int GetSpellID(SkillName name)
{
MasteryInfo info = Infos.FirstOrDefault(i => i.MasterySkill == name && i.Passive);
if (info == null)
return -1;
return info.SpellID;
}
public static int GetLocalization(SkillName name)
{
switch (name)
{
default:
case SkillName.Discordance: return 1151945;
case SkillName.Provocation: return 1151946;
case SkillName.Peacemaking: return 1151947;
case SkillName.Magery: return 1155771;
case SkillName.Mysticism: return 1155772;
case SkillName.Necromancy: return 1155773;
case SkillName.Spellweaving: return 1155774;
case SkillName.Bushido: return 1155775;
case SkillName.Chivalry: return 1155776;
case SkillName.Ninjitsu: return 1155777;
case SkillName.Archery: return 1155786;
case SkillName.Fencing: return 1155778;
case SkillName.Macing: return 1155779;
case SkillName.Swords: return 1155780;
case SkillName.Throwing: return 1155781;
case SkillName.Parry: return 1155782;
case SkillName.Poisoning: return 1155783;
case SkillName.Wrestling: return 1155784;
case SkillName.AnimalTaming: return 1155785;
}
}
#region Passive Bonuses/Maluses
public static int EnchantedSummoningBonus(BaseCreature bc)
{
if (bc.Summoned)
return EnchantedSummoningBonus(bc.SummonMaster);
return 0;
}
public static int EnchantedSummoningBonus(Mobile m)
{
if (IsActivePassive(m, PassiveSpell.EnchantedSummoning))
{
SkillName sk = m.Skills.CurrentMastery;
return (int)((m.Skills[sk].Value + (GetMasteryLevel(m, sk) * 40)) / 16);
}
return 0;
}
public static int AnticipateHitBonus(Mobile m)
{
if (IsActivePassive(m, PassiveSpell.AnticipateHit))
{
return (int)(m.Skills[SkillName.Bushido].Value * .67);
}
return 0;
}
public static int IntuitionBonus(Mobile m)
{
if (IsActivePassive(m, PassiveSpell.Intuition))
{
SkillName sk = m.Skills.CurrentMastery;
return (int)((GetMasteryLevel(m, sk) * 40) / 8);
}
return 0;
}
public static int NonPoisonConsumeChance(Mobile m)
{
if (IsActivePassive(m, PassiveSpell.Potency))
{
double skill = m.Skills[SkillName.Poisoning].Value + m.Skills[SkillName.Anatomy].Value;
skill += GetMasteryLevel(m, SkillName.Poisoning) * 20;
return (int)(skill / 4.375);
}
return 0;
}
public static int GetKnockoutModifier(Mobile m, bool pvp = false)
{
if (IsActivePassive(m, PassiveSpell.Knockout))
{
switch (GetMasteryLevel(m, SkillName.Wrestling))
{
default: return 0;
case 3: return pvp ? 50 : 100;
case 2: return pvp ? 25 : 50;
case 1: return pvp ? 10 : 25;
}
}
return 0;
}
public static int BoardingSlotIncrease(Mobile m)
{
if (IsActivePassive(m, PassiveSpell.Boarding))
{
return GetMasteryLevel(m, SkillName.AnimalTaming);
}
return 0;
}
public static int SavingThrowChance(Mobile m, AosAttribute attr)
{
if (IsActivePassive(m, PassiveSpell.SavingThrow))
{
int level = GetMasteryLevel(m, m.Skills.CurrentMastery);
if (level <= 0)
return 0;
switch (attr)
{
case AosAttribute.AttackChance: return 5;
case AosAttribute.DefendChance: return level > 1 ? 5 : 0;
case AosAttribute.BonusStr: return level > 2 ? 5 : 0;
case AosAttribute.WeaponDamage: return level > 2 ? 5 : 0;
}
}
return 0;
}
#endregion
#region Mastery Skills
public static SkillName[] Skills { get { return _Skills; } }
private static SkillName[] _Skills =
{
SkillName.Peacemaking,
SkillName.Provocation,
SkillName.Discordance,
SkillName.Magery,
SkillName.Mysticism,
SkillName.Necromancy,
SkillName.Spellweaving,
SkillName.Bushido,
SkillName.Chivalry,
SkillName.Ninjitsu,
SkillName.Fencing,
SkillName.Macing,
SkillName.Swords,
SkillName.Throwing,
SkillName.Parry,
SkillName.Poisoning,
SkillName.Wrestling,
SkillName.AnimalTaming,
SkillName.Archery
};
private static int[] _Descriptions =
{
1115707,
1115706,
1115708,
1156303,
1156316,
1156311,
1156315,
1156313,
1156312,
1156314,
1156309,
1156308,
1156307,
1156317,
1156302,
1156304,
1156310,
1156306,
1156305
};
private static string[] _Titles =
{
"the Galvanizer",
"the Exhilarator",
"the Desponder",
"the Marvelous",
"the Enigmatic",
"the Undying",
"the Mysterious",
"the Disciplined",
"the Courageous",
"the Unseen",
"the Needle",
"the Crushing",
"the Blade",
"the Precise",
"the Deflector",
"the Lethal",
"the Champion",
"the Beastmaster",
"the Exact"
};
public static int GetDescription(Mobile m)
{
SkillName sk = m.Skills.CurrentMastery;
for (int i = 0; i < _Skills.Length; i++)
{
if (_Skills[i] == sk)
return _Descriptions[i];
}
return -1;
}
public static string GetTitle(Mobile m)
{
SkillName sk = m.Skills.CurrentMastery;
for(int i = 0; i < _Skills.Length; i++)
{
if (_Skills[i] == sk)
return _Titles[i];
}
return null;
}
#endregion
}
}