2013-08-27 17:14:08 +02:00
|
|
|
|
namespace LOC.Core.Tokens.Client
|
|
|
|
|
{
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Model.Server.PvpServer;
|
|
|
|
|
|
|
|
|
|
public class CustomBuildToken
|
|
|
|
|
{
|
|
|
|
|
public CustomBuildToken() { }
|
|
|
|
|
|
|
|
|
|
public CustomBuildToken(CustomBuild customBuild)
|
|
|
|
|
{
|
|
|
|
|
CustomBuildId = customBuild.CustomBuildId;
|
|
|
|
|
Name = customBuild.Name;
|
|
|
|
|
Active = customBuild.Active;
|
|
|
|
|
CustomBuildNumber = customBuild.CustomBuildNumber;
|
2014-03-28 03:17:31 +01:00
|
|
|
|
PvpClass = customBuild.PvpClass;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
SwordSkill = customBuild.SwordSkill;
|
2014-04-05 21:53:22 +02:00
|
|
|
|
SwordSkillLevel = customBuild.SwordSkillLevel;
|
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
AxeSkill = customBuild.AxeSkill;
|
2014-04-05 21:53:22 +02:00
|
|
|
|
AxeSkillLevel = customBuild.AxeSkillLevel;
|
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
BowSkill = customBuild.BowSkill;
|
2014-04-05 21:53:22 +02:00
|
|
|
|
BowSkillLevel = customBuild.BowSkillLevel;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
ClassPassiveASkill = customBuild.ClassPassiveASkill;
|
2014-04-05 21:53:22 +02:00
|
|
|
|
ClassPassiveASkillLevel = customBuild.ClassPassiveASkillLevel;
|
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
ClassPassiveBSkill = customBuild.ClassPassiveBSkill;
|
2014-04-05 21:53:22 +02:00
|
|
|
|
ClassPassiveBSkillLevel = customBuild.ClassPassiveBSkillLevel;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
GlobalPassiveSkill = customBuild.GlobalPassiveSkill;
|
2014-04-05 21:53:22 +02:00
|
|
|
|
GlobalPassiveSkillLevel = customBuild.GlobalPassiveSkillLevel;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-04-20 05:53:55 +02:00
|
|
|
|
SkillTokens = customBuild.SkillTokens;
|
|
|
|
|
ItemTokens = customBuild.ItemTokens;
|
|
|
|
|
|
2013-08-27 17:14:08 +02:00
|
|
|
|
Slots = new List<SlotToken>();
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot1Material, Name = customBuild.Slot1Name, Amount = customBuild.Slot1Amount });
|
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot2Material, Name = customBuild.Slot2Name, Amount = customBuild.Slot2Amount });
|
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot3Material, Name = customBuild.Slot3Name, Amount = customBuild.Slot3Amount });
|
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot4Material, Name = customBuild.Slot4Name, Amount = customBuild.Slot4Amount });
|
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot5Material, Name = customBuild.Slot5Name, Amount = customBuild.Slot5Amount });
|
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot6Material, Name = customBuild.Slot6Name, Amount = customBuild.Slot6Amount });
|
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot7Material, Name = customBuild.Slot7Name, Amount = customBuild.Slot7Amount });
|
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot8Material, Name = customBuild.Slot8Name, Amount = customBuild.Slot8Amount });
|
|
|
|
|
Slots.Add(new SlotToken { Material = customBuild.Slot9Material, Name = customBuild.Slot9Name, Amount = customBuild.Slot9Amount });
|
2013-08-27 17:14:08 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int CustomBuildId { get; set; }
|
|
|
|
|
|
|
|
|
|
public string PlayerName { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool Active { get; set; }
|
|
|
|
|
|
|
|
|
|
public int CustomBuildNumber { get; set; }
|
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
public string PvpClass { get; set; }
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
public string SwordSkill { get; set; }
|
|
|
|
|
public int SwordSkillLevel { get; set; }
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
public string AxeSkill { get; set; }
|
|
|
|
|
public int AxeSkillLevel { get; set; }
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
public string BowSkill { get; set; }
|
|
|
|
|
public int BowSkillLevel { get; set; }
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
public string ClassPassiveASkill { get; set; }
|
|
|
|
|
public int ClassPassiveASkillLevel { get; set; }
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
public string ClassPassiveBSkill { get; set; }
|
|
|
|
|
public int ClassPassiveBSkillLevel { get; set; }
|
|
|
|
|
|
|
|
|
|
public string GlobalPassiveSkill { get; set; }
|
|
|
|
|
public int GlobalPassiveSkillLevel { get; set; }
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
|
|
|
|
public List<SlotToken> Slots { get; set; }
|
|
|
|
|
|
2014-04-20 05:53:55 +02:00
|
|
|
|
public int SkillTokens { get; set; }
|
|
|
|
|
|
|
|
|
|
public int ItemTokens { get; set; }
|
|
|
|
|
|
2013-08-27 17:14:08 +02:00
|
|
|
|
public CustomBuild GetCustomBuild()
|
|
|
|
|
{
|
|
|
|
|
var customBuild = new CustomBuild();
|
|
|
|
|
|
|
|
|
|
UpdateCustomBuild(customBuild);
|
|
|
|
|
|
|
|
|
|
return customBuild;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateCustomBuild(CustomBuild customBuild)
|
|
|
|
|
{
|
|
|
|
|
customBuild.Name = Name;
|
|
|
|
|
customBuild.Active = Active;
|
|
|
|
|
customBuild.CustomBuildNumber = CustomBuildNumber;
|
2014-03-28 03:17:31 +01:00
|
|
|
|
customBuild.PvpClass = PvpClass;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
customBuild.SwordSkill = SwordSkill;
|
|
|
|
|
customBuild.SwordSkillLevel = SwordSkillLevel;
|
|
|
|
|
customBuild.AxeSkill = AxeSkill;
|
|
|
|
|
customBuild.AxeSkillLevel = AxeSkillLevel;
|
|
|
|
|
customBuild.BowSkill = BowSkill;
|
|
|
|
|
customBuild.BowSkillLevel = BowSkillLevel;
|
|
|
|
|
|
|
|
|
|
customBuild.ClassPassiveASkill = ClassPassiveASkill;
|
|
|
|
|
customBuild.ClassPassiveASkillLevel = ClassPassiveASkillLevel;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
customBuild.ClassPassiveBSkill = ClassPassiveBSkill;
|
|
|
|
|
customBuild.ClassPassiveBSkillLevel = ClassPassiveBSkillLevel;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-03-28 03:17:31 +01:00
|
|
|
|
customBuild.GlobalPassiveSkill = GlobalPassiveSkill;
|
|
|
|
|
customBuild.GlobalPassiveSkillLevel = GlobalPassiveSkillLevel;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
|
2014-04-20 05:53:55 +02:00
|
|
|
|
customBuild.ItemTokens = ItemTokens;
|
|
|
|
|
customBuild.SkillTokens = SkillTokens;
|
|
|
|
|
|
2013-08-27 17:14:08 +02:00
|
|
|
|
if (Slots != null && Slots.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var slots = Slots.ToArray();
|
2014-04-20 07:54:52 +02:00
|
|
|
|
|
|
|
|
|
customBuild.Slot1Name = slots[0].Name;
|
|
|
|
|
customBuild.Slot1Material = slots[0].Material;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot1Amount = slots[0].Amount;
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
customBuild.Slot2Name = slots[1].Name;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot2Material = slots[1].Material;
|
|
|
|
|
customBuild.Slot2Amount = slots[1].Amount;
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
customBuild.Slot3Name = slots[2].Name;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot3Material = slots[2].Material;
|
|
|
|
|
customBuild.Slot3Amount = slots[2].Amount;
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
customBuild.Slot4Name = slots[3].Name;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot4Material = slots[3].Material;
|
|
|
|
|
customBuild.Slot4Amount = slots[3].Amount;
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
customBuild.Slot5Name = slots[4].Name;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot5Material = slots[4].Material;
|
|
|
|
|
customBuild.Slot5Amount = slots[4].Amount;
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
customBuild.Slot6Name = slots[5].Name;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot6Material = slots[5].Material;
|
|
|
|
|
customBuild.Slot6Amount = slots[5].Amount;
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
customBuild.Slot7Name = slots[6].Name;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot7Material = slots[6].Material;
|
|
|
|
|
customBuild.Slot7Amount = slots[6].Amount;
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
customBuild.Slot8Name = slots[7].Name;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot8Material = slots[7].Material;
|
|
|
|
|
customBuild.Slot8Amount = slots[7].Amount;
|
|
|
|
|
|
2014-04-20 07:54:52 +02:00
|
|
|
|
customBuild.Slot9Name = slots[8].Name;
|
2013-08-27 17:14:08 +02:00
|
|
|
|
customBuild.Slot9Material = slots[8].Material;
|
|
|
|
|
customBuild.Slot9Amount = slots[8].Amount;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|