本文整理汇总了C#中BlueSheep.Interface.AccountUC类的典型用法代码示例。如果您正苦于以下问题:C# AccountUC类的具体用法?C# AccountUC怎么用?C# AccountUC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AccountUC类属于BlueSheep.Interface命名空间,在下文中一共展示了AccountUC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PathManager
public PathManager(AccountUC account, string Path, string name)
{
Account = account;
path = Path;
Account.PathDownBt.Text = name;
m_content = File.ReadAllLines(Path).ToList();
}
示例2: listen
private void listen(TcpClient client, AccountUC account)
{
m_Reader = new BigEndianReader(client.GetStream());
//m_MessageInformations = new MessageInformations(account);
//while ((client.Client != null) && (client.Client.Connected))
//{
// byte[] buffer = new byte[client.Client.Available];
// if (buffer.Length != 0)
// {
// if (m_TimerInactivity != null)
// m_TimerInactivity.Change(60000, Timeout.Infinite);
// else
// m_TimerInactivity = new Timer(TimerInactivityFinished, null, 60000, Timeout.Infinite);
// client.Client.Receive(buffer);
// account.LatencyFrame.UpdateLatency();
// m_MessageInformations.ParseBuffer(buffer);
// }
//}
Connected = true;
Thread task_id = new Thread(computeid);
task_id.Start();
}
示例3: NpcDialogQuestionMessageTreatment
public static void NpcDialogQuestionMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
NpcDialogQuestionMessage msg = (NpcDialogQuestionMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
account.Npc.QuestionId = msg.messageId;
int mess = (int)GameData.GetDataObject(D2oFileEnum.NpcMessages, account.Npc.QuestionId).Fields["messageId"];
account.Log(new BotTextInformation("Dialogue : " + BlueSheep.Common.Data.I18N.GetText(mess)), 0);
if (account.Npc.QuestionId == 318 && (int)msg.visibleReplies[0] == 259)
{
//Bank
account.Npc.SendReply(259);
return;
}
else if (account.Npc.QuestionId == 318)
{
account.Log(new ErrorTextInformation("Vous n'êtes pas level 10, vous ne pouvez pas utiliser la banque. Fermeture du dialogue."), 0);
account.Npc.CloseDialog();
}
if (msg.visibleReplies.Length == 0)
account.Npc.CloseDialog();
account.Npc.Replies.Clear();
account.Npc.Replies = msg.visibleReplies.Select<short, BlueSheep.Core.Npc.NpcReply>((id) => new BlueSheep.Core.Npc.NpcReply(account.MapData.Npcs.Find(n => n.contextualId == account.Npc.Id).npcId, id)).ToList();
if (account.Path != null)
{
account.Path.SearchReplies(BlueSheep.Common.Data.I18N.GetText(mess));
}
}
示例4: Npc
public Npc(AccountUC Account)
{
account = Account;
Entity = null;
Npcs = new Dictionary<int, int>();
Replies = new List<NpcReply>();
}
示例5: Condition
public Condition(ConditionEnum condition, object delta, char operateur, AccountUC Account)
{
m_Cond = condition;
m_delta = delta;
m_operateur = operateur;
account = Account;
}
示例6: JobUC
public JobUC(AccountUC Account, Job j , List<TreeNode> nodes = null)
{
InitializeComponent();
account = Account;
job = j;
TV = new TreeView() { Dock = DockStyle.Fill };
Load(nodes);
InitTree();
sadikTabControl1.TabPages[0].Controls.Add(g);
sadikTabControl1.TabPages[1].Controls.Add(gg);
sadikTabControl1.TabPages[2].Controls.Add(TV);
//sadikTabControl1.TabPages[2].Controls.Add(GatherPie);
this.Dock = DockStyle.Fill;
g.Columns.Add("SkillName", "Skills");
g.Columns.Add("RessourceName", "Ressources");
g.Columns.Add("RessourceId", "Id");
g.Columns.Add(new DataGridViewCheckBoxColumn() { Name = "Select", HeaderText = "A récolter"});
g.Columns[1].Width = 200;
g.MultiSelect = false;
gg.Columns.Add("SkillName", "Skills");
gg.Columns.Add("RecipeName", "Recettes");
gg.Columns[1].Width = 200;
gg.Columns.Add("RecipeId", "Id");
gg.ReadOnly = true;
BlueSheep.Engine.Constants.Translate.TranslateUC(this);
}
示例7: BFight
public BFight(AccountUC account, FightParser AI, FightData data)
{
m_Account = account;
m_AI = AI;
m_Data = data;
flag = 1;
}
示例8: Test
public static void Test(uint status, AccountUC account)
{
switch (status)
{
case m_Offline:
account.Log(new ConnectionTextInformation("Echec de connexion : serveur déconnecté."),0);
account.TryReconnect(600);
break;
case m_Saving:
account.Log(new ConnectionTextInformation("Echec de connexion : serveur en sauvegarde."),0);
account.TryReconnect(600);
break;
case m_Full:
account.Log(new ConnectionTextInformation("Echec de connexion : serveur complet."),0);
account.TryReconnect(60);
break;
default:
account.Log(new ConnectionTextInformation("Echec de connexion : raison inconnue."),0);
account.TryReconnect(30);
break;
}
}
示例9: NpcDialogQuestionMessageTreatment
public static void NpcDialogQuestionMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
NpcDialogQuestionMessage msg = (NpcDialogQuestionMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
account.Npc.QuestionId = msg.messageId;
int mess = (int)GameData.GetDataObject(D2oFileEnum.NpcMessages, account.Npc.QuestionId).Fields["messageId"];
account.Log(new BotTextInformation("Dialogue : " + BlueSheep.Common.Data.I18N.GetText(mess)), 0);
if (account.Npc.QuestionId == 318 && (int)msg.visibleReplies[0] == 259)
{
//Bank
account.Npc.SendReply(259);
return;
}
if (msg.visibleReplies.Length == 0)
account.Npc.CloseDialog();
account.Npc.Replies.Clear();
account.Npc.Replies = msg.visibleReplies.Select<short, BlueSheep.Core.Npc.NpcReply>((id) => new BlueSheep.Core.Npc.NpcReply(account.Npc.Npcs[account.Npc.Id], id)).ToList();
if (account.Path != null)
{
account.Path.SearchReplies(BlueSheep.Common.Data.I18N.GetText(mess));
}
}
示例10: ChatServerMessageTreatment
public static void ChatServerMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
ChatServerMessage msg = (ChatServerMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
switch ((int)msg.channel)
{
case 0:
account.Log(new GeneralTextInformation(msg.senderName + ": " + msg.content),1);
break;
case 1:
//account.Log(new DofAlertTextInformation("Bienvenue sur DOFUS, dans le Monde des Douze !" + System.Environment.NewLine + "Il est interdit de transmettre votre identifiant ou votre mot de passe."));
break;
case 2:
account.Log(new GuildTextInformation(msg.senderName + ": " + msg.content),1);
break;
case 3:
account.Log(new AllianceTextInformation(msg.senderName + ": " + msg.content),1);
break;
case 5:
account.Log(new CommerceTextInformation(msg.senderName + ": " + msg.content),1);
break;
case 6:
account.Log(new RecrutementTextInformation(msg.senderName + ": " + msg.content),1);
break;
case 9:
account.Log(new PrivateTextInformation("de " + msg.senderName + " : " + msg.content),1);
break;
}
}
示例11: JobExperienceMultiUpdateMessageTreatment
public static void JobExperienceMultiUpdateMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
JobExperienceMultiUpdateMessage msg = (JobExperienceMultiUpdateMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
foreach (JobExperience i in msg.experiencesUpdate)
{
foreach (Core.Job.Job j in account.Jobs)
{
if (i.jobId == j.Id)
{
j.Level = i.jobLevel;
j.XP = (int)i.jobXP;
j.XpLevelFloor =(int)i.jobXpLevelFloor;
j.XpNextLevelFloor = (int)i.jobXpNextLevelFloor;
break;
}
}
}
account.ActualizeJobs();
foreach (JobUC j in account.JobsUC)
{
j.populateTreeview();
}
}
示例12: Init
public void Init(AccountUC account)
{
int skillUID = 0;
foreach (InteractiveElementSkill skill in account.Safe.enabledSkills)
{
if (skill.skillId == 104)
{
skillUID = skill.skillInstanceUid;
break;
}
}
InteractiveUseRequestMessage interactiveUseRequestMessage = new InteractiveUseRequestMessage(
account.Safe.elementId,
skillUID);
using (BigEndianWriter writer = new BigEndianWriter())
{
interactiveUseRequestMessage.Serialize(writer);
writer.Content = account.HumanCheck.hash_function(writer.Content);
MessagePackaging messagePackaging = new MessagePackaging(writer);
messagePackaging.Pack((int)interactiveUseRequestMessage.ProtocolID);
account.SocketManager.Send(messagePackaging.Writer.Content);
account.LastPacketID.Clear();
if (account.DebugMode.Checked)
account.Log(new BlueSheep.Interface.Text.DebugTextInformation("[SND] 5001 (InteractiveUseRequestMessage)"), 0);
}
}
示例13: CharacterExperienceGainMessageTreatment
public static void CharacterExperienceGainMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
CharacterExperienceGainMessage msg = (CharacterExperienceGainMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
account.Log(new ActionTextInformation("Experience gagnée : + " + msg.experienceCharacter + " points d'expérience"), 4);
account.CharacterStats.experience += msg.experienceCharacter;
double i = account.CharacterStats.experience - account.CharacterStats.experienceLevelFloor;
double j = account.CharacterStats.experienceNextLevelFloor - account.CharacterStats.experienceLevelFloor;
try
{
int xppercent = (int)((i / j) * 100);
}
catch (Exception ex)
{
}
account.ModifBar(1, (int)account.CharacterStats.experienceNextLevelFloor - (int)account.CharacterStats.experienceLevelFloor, (int)account.CharacterStats.experience - (int)account.CharacterStats.experienceLevelFloor, "Experience");
if (account.Fight != null)
{
account.FightData.xpWon[DateTime.Today] += (int)msg.experienceCharacter;
}
}
示例14: IAChoice
public IAChoice(AccountUC account)
{
InitializeComponent();
Account = account;
switch (MainForm.ActualMainForm.Lang)
{
case "EN":
this.Text = "AI Manager";
DelBt.Text = "Delete";
LoadBt.Text = "Load";
AddBt.Text = "Add";
FilesList.Columns[0].Text = "Name";
FilesList.Columns[1].Text = "Author";
FilesList.Columns[2].Text = "Breed";
break;
}
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\BlueSheep\IAs");
if (di.GetFiles().Count() == 0)
{
System.Windows.Forms.MessageBox.Show("Aucune IA, veuillez en télécharger sur le forum ou créer la vôtre :) ");
}
else
{
foreach (System.IO.FileInfo file in di.GetFiles())
{
if (file.Extension == ".bs")
LoadIA(file);
}
}
}
示例15: GameActionFightDispellableEffectMessageTreatment
public static void GameActionFightDispellableEffectMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
GameActionFightDispellableEffectMessage msg = (GameActionFightDispellableEffectMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
if (msg.effect is FightTemporaryBoostStateEffect)
{
FightTemporaryBoostStateEffect effect = (FightTemporaryBoostStateEffect)msg.effect;
if (effect.targetId == account.Fight.Fighter.Id)
{
if (account.Fight.DurationByEffect.ContainsKey(effect.stateId))
account.Fight.DurationByEffect.Remove(effect.stateId);
account.Fight.DurationByEffect.Add(effect.stateId, effect.turnDuration);
}
}
else if (msg.effect is FightTemporaryBoostEffect)
{
FightTemporaryBoostEffect effect = (FightTemporaryBoostEffect)msg.effect;
if (msg.actionId == 168)
((BFighter)account.Fight.Fighter).ActionPoints = account.Fight.Fighter.ActionPoints - effect.delta;
else if (msg.actionId == 169)
((BFighter)account.Fight.Fighter).MovementPoints = account.Fight.Fighter.MovementPoints - effect.delta;
}
}