مشاهدة النسخة كاملة : حل مشكلة الانر بور برستر السيرفر بيترستر من الاول
ahmedfathy
2019-10-23, 12:56 PM
يا رجاله الللعبة اول ما برسترها الانر بور بيترستر معاها الحل ايه
Hassan Emprator
2019-10-23, 02:34 PM
ابحث عن الكود دا
public static bool Save(bool Exit = false)
ضيف فيه دا
Database.InnerPowerTable.Save();
ahmedfathy
2019-10-23, 02:40 PM
مفيش فايدة بردوه السطر موجود اصلآ
اهوه
public static bool Save(bool Exit = false)
{
try
{
Database.JiangHu.SaveJiangHu();
using (var conn = Database.DataHolder.MySqlConnection)
{
conn.Open();
foreach (Client.GameState client in Program.Values)
{
Database.EntityTable.SaveEntity(client);
Database.SkillTable.SaveProficiencies(client);
Database.ArenaTable.SaveArenaStatistics(client.Are naStatistic);
Database.TeamArenaTable.SaveArenaStatistics(client .TeamArenaStatistic);
}
}
Database.InnerPowerTable.Save();
Database.Flowers.SaveFlowers();
AuctionBase.Save();
Game.ClanWarArena.Save();
using (MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("configuration").Where("Server", Constants.ServerName))
{
using (MySqlReader r = new MySqlReader(cmd))
{
if (r.Read())
{
new Database.MySqlCommand(Database.MySqlCommandType.UP DATE).Update("configuration").Set("EntityID", EntityUID.Now).Set("ServerKingdom", Kernel.ServerKingdom).Set("GuildID", Game.ConquerStructures.Society.Guild.GuildCounter. Now).Where("Server", Constants.ServerName).Execute();
if (r.ReadByte("LastDailySignReset") != DateTime.Now.Month) MsgSignIn.Reset();
}
}
}
using (var cmd = new MySqlCommand(MySqlCommandType.UPDATE).Update("configuration"))
cmd.Set("LastDailySignReset", DateTime.Now.Month).Execute();
Console.WriteLine("Saving cmd Done.");
if (Exit)
Environment.Exit(0);
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
return false;
}
return true;
}
packethandler.cs
welcomemessage
#region Inner
if (!InnerPower.InnerPowerPolle.TryGetValue(client.Pl ayer.UID, out client.Player.InnerPower))
{
client.Player.InnerPower = new InnerPower(client.Player.Name, client.Player.UID);
Database.InnerPowerTable.New(client);
}
client.Player.InnerPower.UpdateStatus();
client.Player.InnerPower.AddPotency(null, client, 0);
client.LoadItemStats();
#endregion
program
Console.WriteLine("Initializing Database.");
InnerPowerTable.LoadDBInformation();
InnerPowerTable.Load();
case ActionID.UpdateGong
case ActionID.UpdateGong:
{
Database.InnerPowerTable.Stage DBStage = null;
Database.InnerPowerTable.Stage.NeiGong DBGong = null;
if (Database.InnerPowerTable.GetDBInfo(dwparam, out DBStage, out DBGong))
{
InnerPower.Stage stage = null;
InnerPower.Stage.NeiGong gong = null;
if (client.Player.InnerPower.TryGetStageAndGong((byte )dwparam, out stage, out gong))
{
if (stage.UnLocked && gong.Unlocked && gong.level < DBGong.MaxLevel)
{
int potency_cost = (int)DBGong.ProgressNeiGongValue[Math.Min(gong.level, (int)(DBGong.ProgressNeiGongValue.Length - 1))];
if (client.Player.InnerPower.Potency >= potency_cost)
{
client.Player.InnerPower.AddPotency(stream, client, -potency_cost);
gong.level += 1;
gong.Score = (byte)Math.Ceiling(((float)((float)100 / (float)DBGong.MaxLevel) * (float)gong.level));
gong.Complete = gong.level == DBGong.MaxLevel;
client.Send(stream.InnerPowerGui(client.Player.Inn erPower.GetNeiGongs()));
client.Send(stream.InnerPowerStageInfo(InnerPowerS tage.ActionID.UpdateStage, client.Player.UID, stage));
client.Send(stream.InnerPowerStageInfo(InnerPowerS tage.ActionID.UpdateScore, client.Player.UID, stage));
client.Player.InnerPower.UpdateStatus();
client.LoadItemStats();
InnerPower.InnerPowerRank.UpdateRank(client.Player .InnerPower);
}
}
}
}
break;
}
vBulletin® v3.8.8 Beta 1, Copyright ©2000-2024, TranZ by code