|
|
المشاركات 222 |
+التقييم 0.13 |
تاريخ التسجيل Feb 2020 |
الاقامة اسكندريه |
نظام التشغيل C#C |
رقم العضوية 3522 |
#region Titly by elsaher
case 17526:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello " + client.Player.Name + ", How are you ? I am the manager of the new titles / wings");
dialog.Text("Do you want to buy wings / titles For free?");
dialog.Option("All Wing&Titel", 1);
break;
}
case 1:
{
new TitleStorage().GetAll(client);
break;
}
}
break;
}
#endregion
public void Handle(Client.GameState client)
public void Handle(Client.GameState client)
{
switch (Info.ActionId)
{
case Action.Unequip:
{
if (StorageManager.Wing<bool>(Info.Type, Info.Id))
{
client.Player.EquippedWing = 0;
client.Player.NowEquippedWing.Clear();
}
else if (StorageManager.Title<bool>(Info.Type, Info.Id))
{
client.Player.EquippedTitle = 0;
client.Player.NowEquippedTitle.Clear();
}
client.Send(FinalizeProtoBuf(Info));
break;
}
case Action.Equip:
{
if (client.Player.UTitlePoints < StorageManager.GetTitlePoints((short)Info.Type, (short)Info.Id))
break;
if (StorageManager.Wing<bool>(Info.Type, Info.Id))
{
client.Player.EquippedWing = StorageManager.Wing<int>(Info.Type, Info.Id);
client.Player.NowEquippedWing.Clear();
client.Player.NowEquippedWing.Add(Info.Type + "~" + Info.Id);
}
else if (StorageManager.Title<bool>(Info.Type, Info.Id))
{
client.Player.EquippedTitle = StorageManager.Title<int>(Info.Type, Info.Id);
client.Player.NowEquippedTitle.Clear();
client.Player.NowEquippedTitle.Add(Info.Type + "~" + Info.Id);
}
Info = new TitleStorageProto()
{
ActionId = Action.Equip,
Points = client.Player.UTitlePoints,
Type = Info.Type,
Id = Info.Id,
};
client.Send(FinalizeProtoBuf(Info));
break;
}
}
new TitleStorage().CheckTitles(client);
}
public void GetAll(Client.GameState client)
{
foreach (var title in Database.WardrobeTable.Titles.Values)
{
AddTitle(client, (short)title.Type, (short)title.ID, false);
}
client.Player.haveallTitles = true;
}
private bool CollectedMonkey
public void CheckTitles(Client.GameState client)
{
if (client.Player.haveallTitles) { GetAll(client); return; }
#region Titles And Wings Equips
#region Wings
#region Union Emperor
if (client.Union != null)
if (client.Union.IsKingdom())
if (client.Union.IsLeader(client.Player.UID))
new TitleStorage().AddTitle(client, 4001, 1000, false);
else
new TitleStorage().RemoveTitle(client, 4001, 1000, false);
else
new TitleStorage().RemoveTitle(client, 4001, 1000, false);
else
new TitleStorage().RemoveTitle(client, 4001, 1000, false);
#endregion
#region The Champion Of Elite Pk Tournament
if (client.Player.Titles.ContainsKey(TitlePacket.Titles.ElitePKChamption_High))
{
new TitleStorage().AddTitle(client, 6001, 20, false);
}
else
new TitleStorage().RemoveTitle(client, 6001, 20, false);
#endregion
#region Own a 5-star garment
if (Database.WardrobeTable.AmountStarGarments(client, 5) >= 1)
{
new TitleStorage().AddTitle(client, 6003, 22, false);
}
else
new TitleStorage().RemoveTitle(client, 6003, 22, false);
#endregion
#region Own a 5-star Mount armor
if (Database.WardrobeTable.AmountStarMounts(client, 5) >= 1)
{
new TitleStorage().AddTitle(client, 6004, 23, false);
}
else
new TitleStorage().RemoveTitle(client, 6004, 23, false);
#endregion
#region Prestige Score reaches 600,000
if (client.Player.TotalPerfectionScore >= 600000)
{
new TitleStorage().AddTitle(client, 2026, 2026, false);
}
else
new TitleStorage().RemoveTitle(client, 2026, 2026, false);
#endregion
#region Stars Score reaches 324
if (client.Equipment.TotalStars >= 324)
{
new TitleStorage().AddTitle(client, 6007, 6007, false);
}
else
new TitleStorage().RemoveTitle(client, 6007, 6007, false);
#endregion
#region Stars Score reaches 216
if (client.Equipment.TotalStars >= 216)
{
new TitleStorage().AddTitle(client, 6008, 6008, false);
}
else
new TitleStorage().RemoveTitle(client, 6008, 6008, false);
#endregion
#endregion
#region Titles
#region Union Emperor
if (client.Union != null)
if (client.Union.IsKingdom())
if (client.Union.IsLeader(client.Player.UID))
new TitleStorage().AddTitle(client, 1, 1000, false);
else
new TitleStorage().RemoveTitle(client, 1, 1000, false);
else
new TitleStorage().RemoveTitle(client, 1, 1000, false);
else
new TitleStorage().RemoveTitle(client, 1, 1000, false);
#endregion
#region CollectedRandMonkey
if (CollectedRandMonkey(client))
{
new TitleStorage().AddTitle(client, 2013, 14, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2013, 14, false);
}
#endregion
#region Collect 8 kinds of permanent saint monkeys (can be activated via the Wardrobe after the event)
if (Collected8TypesMonkey(client))
{
new TitleStorage().AddTitle(client, 2016, 17, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2016, 17, false);
}
#endregion
#region Collect a permanent Solar Monkey
if (CollectedMonkey(client, 200559))
{
new TitleStorage().AddTitle(client, 2014, 15, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2014, 15, false);
}
#endregion
#region Collect a permanent Lunar Monkey
if (CollectedMonkey(client, 200560))
{
new TitleStorage().AddTitle(client, 2015, 16, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2015, 16, false);
}
#endregion
#region The Total Score of Chi Study Reaches 1.600 Points
if (client.ChiData.DragonPoints == 400 && client.ChiData.PhoenixPoints == 400 && client.ChiData.TigerPoints == 400 && client.ChiData.TurtlePoints == 400)
{
new TitleStorage().AddTitle(client, 2018, 1, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2018, 1, false);
}
#endregion
#region Prestige Score reaches 400,000
if (client.Player.TotalPerfectionScore >= 400000)
{
new TitleStorage().AddTitle(client, 2027, 2027, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2027, 2027, false);
}
#endregion
#region The Total Score Of Jiang hu training reaches 81,000 points(Title)
if (client.Player.MyJiang != null && client.Player.MyJiang.Inner_Strength >= 81000)
{
new TitleStorage().AddTitle(client, 2004, 5, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2004, 5, false);
}
#endregion
#region Complete 320 Achievement
if (client.Player.MyAchievement.Count(client.Player.UID) >= 320)
{
new TitleStorage().AddTitle(client, 2001, 2, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2001, 2, false);
}
#endregion
#region Own 5 garments of 4-star or 5-star
if (Database.WardrobeTable.AmountStarGarments(client, 4) >= 5)
{
new TitleStorage().AddTitle(client, 2005, 6, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2005, 6, false);
}
#endregion
#region Own 5 Mount of 4-star or 5-star
if (Database.WardrobeTable.AmountStarMounts(client, 4) >= 5)
{
new TitleStorage().AddTitle(client, 2006, 7, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2006, 7, false);
}
#endregion
#region CelestialFox(200595)
if (CollectedCelestialFox(client))
{
new TitleStorage().AddTitle(client, 2050, 2050, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2050, 2050, false);
}
#endregion
#region CelestialFox(Fantasy)(200596)
if (CollectedCelestialFoxFantasy(client))
{
new TitleStorage().AddTitle(client, 2051, 2051, false);
}
else
{
new TitleStorage().RemoveTitle(client, 2051, 2051, false);
}
#endregion
#endregion
#endregion
#region GM
/*if (client.Account.State == Database.AccountTable.AccountState.GameMaster)
{
foreach (var title in Database.WardrobeTable.Titles.Values)
{
AddTitle(client, (short)title.Type, (short)title.ID);
}
}*/
#endregion
}
|
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|