|
|
using (var conn = database.dataholder.mysqlconnection)
{
conn.open();
nobilityoff.save(this, conn);
}
using ResidentEvil.Game;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ResidentEvil.Network.GamePackets;
using System.Threading;
using System.Threading.Generic;
using ResidentEvil.Network;
using ResidentEvil.Game.ConquerStructures;
using ResidentEvil.Game.ConquerStructures.Society;
using ResidentEvil.Client;
using System.Drawing;
using ResidentEvil.Database;
using ResidentEvil.ElJoKeR;
namespace ResidentEvil
{
public class NobilityOff
{
public void Load(Client.GameState c)
{
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("nobilityoff").Where("UID", c.Entity.UID))
using (var reader = new MySqlReader(cmd))
{
if (reader.Read())
{
c.NobilityInformation.Donation = reader.ReadUInt64("OldDonation");
}
MySqlCommand hossam = new MySqlCommand(MySqlCommandType.DELETE);
hossam.Delete("nobilityoff", "UID", c.Entity.UID).Execute();
}
Database.NobilityTable.UpdateNobilityInformation(c.NobilityInformation);
Game.ConquerStructures.Nobility.Sort(c.Entity.UID);
}
public static void Save(Client.GameState client, MySql.Data.MySqlClient.MySqlConnection conn)
{
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("nobilityoff").Where("UID", client.Entity.UID))
using (var reader = new MySqlReader(cmd))
{
if (!reader.Read())
using (var cmds = new MySqlCommand(MySqlCommandType.INSERT))
cmds.Insert("nobilityoff").Insert("UID", client.Entity.UID).Insert("OldDonation", client.NobilityInformation.Donation).Execute();
}
client.NobilityInformation.Donation = 0;
Database.NobilityTable.UpdateNobilityInformation(client.NobilityInformation);
Game.ConquerStructures.Nobility.Sort(client.Entity.UID);
}
}
}
GameState Or GameClient
public NobilityOff NobilityOff = new NobilityOff();
void ShutDown()
NobilityOff.Save(this, conn);
EntityTable
client.Entity.FullyLoaded = true;
client.NobilityOff.Load(client);
program
public static bool Save()
NobilityOff.Save(client, conn);
| الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
| الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
| صفحه تسجيل جديده بشكل جديده في Script Hashish | ahmedBayoumi12 | صفحات التسجيل كونكر اونلاين | 48 | 2021-01-07 10:06 PM |
| فكرة جديده نتيجة طلب عضو : Ahmeed Sheeko | Commander | تطوير سيرفرات كونكر | 12 | 2020-09-30 06:27 AM |
| كويستة جديده ادخل وشوف | Hazem | تطوير سيرفرات كونكر | 1 | 2020-09-15 01:51 PM |
| سيرفر صعب لسه معمول زى كونكر اونلاين خش وشوف | عمرو الجنرال | اعلانات السيرفيرات الشخصية | 0 | 2019-11-20 05:50 AM |
| بـخـصوص NobilityOff | abuhaneen | مشكلات السيرفيرات كونكر الشخصيه | 13 | 2019-08-22 10:23 AM |