本文整理汇总了C#中BlueSheep.Interface.AccountUC.Log方法的典型用法代码示例。如果您正苦于以下问题:C# AccountUC.Log方法的具体用法?C# AccountUC.Log怎么用?C# AccountUC.Log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlueSheep.Interface.AccountUC
的用法示例。
在下文中一共展示了AccountUC.Log方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
public static void Test(int reason, AccountUC account)
{
switch (reason)
{
case m_WrongCredentials:
account.Log(new ErrorTextInformation("Echec de connexion : mauvais identifiants."),0);
break;
case m_Banned:
account.Log(new ErrorTextInformation("Echec de connexion : compte banni."), 0);
break;
case m_Kicked:
account.Log(new ErrorTextInformation("Echec de connexion : compte banni temporairement."), 0);
break;
case m_InMaintenance:
account.Log(new ErrorTextInformation("Echec de connexion : serveur en maintenance."), 0);
account.TryReconnect(15);
break;
default:
account.Log(new ErrorTextInformation("Echec de connexion : erreur inconnue."), 0);
break;
}
}
示例2: 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));
}
}
示例3: 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;
}
}
示例4: 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);
}
}
示例5: 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));
}
}
示例6: 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;
}
}
示例7: InventoryContentAndPresetMessageTreatment
public static void InventoryContentAndPresetMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
InventoryContentAndPresetMessage msg = (InventoryContentAndPresetMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
foreach (ObjectItem item in msg.objects)
{
Core.Inventory.Item i = new Core.Inventory.Item(item.Effects.ToList(), item.ObjectGID, item.Position, item.Quantity, item.ObjectUID, account);
account.Inventory.Items.Add(i);
}
account.ActualizeInventory();
account.petsList = new List<Pet>();
foreach (Core.Inventory.Item item in account.Inventory.Items)
{
DataClass itemData = GameData.GetDataObject(D2oFileEnum.Items, item.GID);
if ((int)itemData.Fields["typeId"] == 18)
{
Pet pet = new Pet(item, itemData, account);
account.petsList.Add(pet);
pet.SetFood();
}
}
account.Log(new BotTextInformation("Vos " +
account.petsList.Count + " familiers vous font un gros bisou de la part de BlueSheep."), 5);
if (!account.IsMITM)
{
FriendsGetListMessage friendGetListMessage = new FriendsGetListMessage();
account.SocketManager.Send(friendGetListMessage);
IgnoredGetListMessage ignoredGetListMessage = new IgnoredGetListMessage();
account.SocketManager.Send(ignoredGetListMessage);
SpouseGetInformationsMessage spouseGetInformationsMessage = new SpouseGetInformationsMessage();
account.SocketManager.Send(spouseGetInformationsMessage);
Random random = new Random();
const string hexChars = "0123456789ABCDEF";
string key = string.Empty;
for (int index = 0; index < 20; index++)
{
int randomValue = random.Next(100);
if (randomValue <= 40)
key += (char)(random.Next(26) + 65);
else if (randomValue <= 80)
key += (char)(random.Next(26) + 97);
else
key += (char)(random.Next(10) + 48);
}
int pos = key.Sum(t => t % 16);
key += hexChars[pos % 16];
ClientKeyMessage clientKeyMessage = new ClientKeyMessage(key);
account.SocketManager.Send(clientKeyMessage);
GameContextCreateRequestMessage gameContextCreateRequestMessage = new GameContextCreateRequestMessage();
account.SocketManager.Send(gameContextCreateRequestMessage);
ChannelEnablingMessage channelEnablingMessage = new ChannelEnablingMessage((sbyte)7, false);
account.SocketManager.Send(channelEnablingMessage);
}
}
示例8: AccountLoggingKickedMessageTreatment
public static void AccountLoggingKickedMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
AccountLoggingKickedMessage btmsg = (AccountLoggingKickedMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
btmsg.Deserialize(reader);
}
account.Log(new ErrorTextInformation(String.Format("Compte banni {0} jours, {1} heures, {2} minutes :'( ", btmsg.days, btmsg.hours, btmsg.minutes)), 0);
}
示例9: IdentificationFailedBannedMessageTreatment
public static void IdentificationFailedBannedMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
IdentificationFailedBannedMessage msg = (IdentificationFailedBannedMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
account.Log(new ConnectionTextInformation("Echec de connexion : Vous êtes bannis."), 0);
account.SocketManager.DisconnectFromGUI();
}
示例10: CharacterLevelUpMessageTreatment
public static void CharacterLevelUpMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
CharacterLevelUpMessage msg = (CharacterLevelUpMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
account.ModifBar(8, 0, 0, Convert.ToString(msg.newLevel));
account.Log(new BotTextInformation("Level up ! New level : " + Convert.ToString(msg.newLevel)), 3);
}
示例11: AchievementFinishedTreatment
public static void AchievementFinishedTreatment(Message message, byte[] packetDatas, AccountUC account)
{
AchievementFinishedMessage msg = (AchievementFinishedMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
DataClass d = GameData.GetDataObject(D2oFileEnum.Achievements, msg.id);
account.Log(new ActionTextInformation("Succès débloqué : " + I18N.GetText((int)d.Fields["nameId"])),3);
AchievementRewardRequestMessage nmsg = new AchievementRewardRequestMessage(-1);
account.SocketManager.Send(nmsg);
}
示例12: QueueStatusMessageTreatment
public static void QueueStatusMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
QueueStatusMessage queueStatusMessage = (QueueStatusMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
queueStatusMessage.Deserialize(reader);
}
account.Log(new QueueTextInformation("File d'attente : " + queueStatusMessage.position + "/"
+ queueStatusMessage.total + "."),0);
}
示例13: 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;
}
}
示例14: GameActionFightDeathMessageTreatment
public static void GameActionFightDeathMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
GameActionFightDeathMessage msg = (GameActionFightDeathMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
msg.Deserialize(reader);
}
BFighter fighter = account.Fight.GetFighter(msg.targetId);
if (fighter != null)
{
fighter.IsAlive = false;
fighter.LifePoints = 0;
if (fighter.Id == account.Fight.Fighter.Id)
{
account.Log(new ErrorTextInformation("Personnage mort :'("), 0);
}
account.Fight.Fighters.RemoveAt(account.Fight.Fighters.IndexOf(account.Fight.GetFighter(msg.targetId)));
}
if (fighter.CreatureGenericId != 0)
{
account.Log(new ActionTextInformation(BlueSheep.Common.Data.I18N.GetText((int)GameData.GetDataObject(D2oFileEnum.Monsters, fighter.CreatureGenericId).Fields["nameId"]) + "est mort ! "), 5);
}
account.Fight.DeadEnnemiInTurn += 1;
}
示例15: HelloConnectMessageTreatment
public static void HelloConnectMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
{
account.SetStatus(Status.None);
if (!account.IsMITM)
{
HelloConnectMessage helloConnectMessage = (HelloConnectMessage)message;
using (BigEndianReader reader = new BigEndianReader(packetDatas))
{
helloConnectMessage.Deserialize(reader);
}
sbyte[] credentials = RSAKey.Encrypt(helloConnectMessage.key,
account.AccountName,
account.AccountPassword,
helloConnectMessage.salt);
IdentificationMessage msg = new IdentificationMessage(GameConstants.AutoConnect, GameConstants.UseCertificate, GameConstants.UseLoginToken, new Common.Protocol.Types.VersionExtended(GameConstants.Major, GameConstants.Minor, GameConstants.Release, GameConstants.Revision, GameConstants.Patch, GameConstants.BuildType, GameConstants.Install, GameConstants.Technology), GameConstants.Lang, credentials, GameConstants.ServerID, GameConstants.SessionOptionalSalt, new System.Collections.Generic.List<short>() );
account.SocketManager.Send(msg);
}
account.Log(new ConnectionTextInformation("Identification en cours."), 0);
}