AccueilFAQRechercherMembresGroupesS'enregistrerConnexionCalendrier
Bienvenue Parmis nous !
En postant vous gagnerez des Points et des Niveaux
Aider nous à faire de la publicité !

Partagez | 
 

 [Tutoriel] Guide Fixage AzureEmulateur

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
J.Fry
Manager Pandaco
avatar

Messages : 8
Réputation : 1
Niveau : 2
Points : 23

Retro Habbix
Pseudo Retro Smiix

MessageSujet: [Tutoriel] Guide Fixage AzureEmulateur   Dim 10 Jan - 22:54

Azure Emualteur 2.0 FIX





Fix n°1 : Amis Dupliqués 
Merci à Animaxus de chez Kekomundo et AllStorm de chez iBuild
Ouvrir la source d'Azure avec Visualstudio, et rendez-vous dans : 
Azure.Emulator > Messages > Handlers > Messenger.cs
Supprimer cette ligne : Session.GetHabbo().InitMessenger();
Ensuite, rendez-vous ici : 
Azure.Emulator > Messages > Handlers > Others.cs
Rendez-vous en ligne 302 et juste après "SendResponse();" rajouté  Session.GetHabbo().InitMessenger();
Sauvegardez, et relancez l'émulateur, les bugs d'amis sont fixés ! 
En vidéo : 
Fix n°2 : Bug Emulateur Groupe
Merci à Sir Jamal pour ce tutoriel
Quand vous créez un groupe, celui-ci fonctionne, mas une fois le redémarrage de l'émulateur efffectué, vous n'arrivez plus à vous connecter ? 
Et bien, voici la solution !
Pour commencer, rendez vous sur votre db et supprimez ces tables : groups_data, groups_members, groups_requests
Une fois supprimés, insérer ce code sql : 

Code:
[justify][size=16][size=13]CREATE TABLE IF NOT EXISTS `groups_data` ([/size][/size][/justify]
[justify][size=16][size=13] `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,[/size][/size][/justify]
[justify][size=16][size=13] `name` VARCHAR(50) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `desc` VARCHAR(255) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `badge` VARCHAR(50) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `owner_id` INT(11) UNSIGNED NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `created` INT(50) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `room_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `state` INT(1) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `colour1` INT(11) NOT NULL DEFAULT '242424',[/size][/size][/justify]
[justify][size=16][size=13] `colour2` INT(11) NOT NULL DEFAULT '242424',[/size][/size][/justify]
[justify][size=16][size=13] `admindeco` INT(1) UNSIGNED DEFAULT '1',[/size][/size][/justify]
[justify][size=16][size=13] `has_forum` enum('0','1') NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_name` VARCHAR(255) NOT NULL DEFAULT '',[/size][/size][/justify]
[justify][size=16][size=13] `forum_description` VARCHAR(4096) NOT NULL DEFAULT '',[/size][/size][/justify]
[justify][size=16][size=13] `forum_messages_count` INT(11) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_score` INT(11) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_lastposter_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_lastposter_name` VARCHAR(255) NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_lastposter_timestamp` INT(11) NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `who_can_read` INT(11) NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `who_can_post` INT(11) NOT NULL DEFAULT '1',[/size][/size][/justify]
[justify][size=16][size=13] `who_can_thread` INT(11) NOT NULL DEFAULT '1',[/size][/size][/justify]
[justify][size=16][size=13] `who_can_mod` INT(11) NOT NULL DEFAULT '2',[/size][/size][/justify]
[justify][size=16][size=13] PRIMARY KEY (`id`),[/size][/size][/justify]
[justify][size=16][size=13] KEY `id` (`id`) USING BTREE[/size][/size][/justify]
[justify][size=16][size=13]) ENGINE=InnoDB  DEFAULT CHARSET=latin1;[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]-- --------------------------------------------------------[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]--[/size][/size][/justify]
[justify][size=16][size=13]-- Structure de la table `groups_members`[/size][/size][/justify]
[justify][size=16][size=13]--[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]CREATE TABLE IF NOT EXISTS `groups_members` ([/size][/size][/justify]
[justify][size=16][size=13] `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,[/size][/size][/justify]
[justify][size=16][size=13] `group_id` INT(11) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `user_id` INT(11) UNSIGNED NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `rank` INT(1) NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `date_join` INT(50) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] PRIMARY KEY (`id`),[/size][/size][/justify]
[justify][size=16][size=13] KEY `groupid` (`group_id`) USING BTREE,[/size][/size][/justify]
[justify][size=16][size=13] KEY `userid` (`user_id`) USING BTREE[/size][/size][/justify]
[justify][size=16][size=13]) ENGINE=InnoDB  DEFAULT CHARSET=latin1;[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]-- --------------------------------------------------------[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]--[/size][/size][/justify]
[justify][size=16][size=13]-- Structure de la table `groups_requests`[/size][/size][/justify]
[justify][size=16][size=13]--[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]CREATE TABLE IF NOT EXISTS `groups_requests` ([/size][/size][/justify]
[justify][size=16][size=13] `group_id` INT(11) UNSIGNED NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `user_id` INT(11) UNSIGNED NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] KEY `groupid` (`group_id`) USING BTREE,[/size][/size][/justify]
[justify][size=16][size=13] KEY `userid` (`user_id`) USING BTREE[/size][/size][/justify]
[justify][size=16][size=13]) ENGINE=InnoDB DEFAULT CHARSET=latin1;[/size][/size][/justify]
[justify][size=16][size=13]CREATE TABLE IF NOT EXISTS `groups_data` ([/size][/size][/justify]
[justify][size=16][size=13] `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,[/size][/size][/justify]
[justify][size=16][size=13] `name` VARCHAR(50) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `desc` VARCHAR(255) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `badge` VARCHAR(50) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `owner_id` INT(11) UNSIGNED NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `created` INT(50) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `room_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `state` INT(1) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `colour1` INT(11) NOT NULL DEFAULT '242424',[/size][/size][/justify]
[justify][size=16][size=13] `colour2` INT(11) NOT NULL DEFAULT '242424',[/size][/size][/justify]
[justify][size=16][size=13] `admindeco` INT(1) UNSIGNED DEFAULT '1',[/size][/size][/justify]
[justify][size=16][size=13] `has_forum` enum('0','1') NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_name` VARCHAR(255) NOT NULL DEFAULT '',[/size][/size][/justify]
[justify][size=16][size=13] `forum_description` VARCHAR(4096) NOT NULL DEFAULT '',[/size][/size][/justify]
[justify][size=16][size=13] `forum_messages_count` INT(11) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_score` INT(11) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_lastposter_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_lastposter_name` VARCHAR(255) NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `forum_lastposter_timestamp` INT(11) NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `who_can_read` INT(11) NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `who_can_post` INT(11) NOT NULL DEFAULT '1',[/size][/size][/justify]
[justify][size=16][size=13] `who_can_thread` INT(11) NOT NULL DEFAULT '1',[/size][/size][/justify]
[justify][size=16][size=13] `who_can_mod` INT(11) NOT NULL DEFAULT '2',[/size][/size][/justify]
[justify][size=16][size=13] PRIMARY KEY (`id`),[/size][/size][/justify]
[justify][size=16][size=13] KEY `id` (`id`) USING BTREE[/size][/size][/justify]
[justify][size=16][size=13]) ENGINE=InnoDB  DEFAULT CHARSET=latin1;[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]-- --------------------------------------------------------[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]--[/size][/size][/justify]
[justify][size=16][size=13]-- Structure de la table `groups_members`[/size][/size][/justify]
[justify][size=16][size=13]--[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]CREATE TABLE IF NOT EXISTS `groups_members` ([/size][/size][/justify]
[justify][size=16][size=13] `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,[/size][/size][/justify]
[justify][size=16][size=13] `group_id` INT(11) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `user_id` INT(11) UNSIGNED NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `rank` INT(1) NOT NULL DEFAULT '0',[/size][/size][/justify]
[justify][size=16][size=13] `date_join` INT(50) NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] PRIMARY KEY (`id`),[/size][/size][/justify]
[justify][size=16][size=13] KEY `groupid` (`group_id`) USING BTREE,[/size][/size][/justify]
[justify][size=16][size=13] KEY `userid` (`user_id`) USING BTREE[/size][/size][/justify]
[justify][size=16][size=13]) ENGINE=InnoDB  DEFAULT CHARSET=latin1;[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]-- --------------------------------------------------------[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]--[/size][/size][/justify]
[justify][size=16][size=13]-- Structure de la table `groups_requests`[/size][/size][/justify]
[justify][size=16][size=13]--[/size][/size][/justify]
[justify][size=16][size=13]
[/size][/size][/justify]
[justify][size=16][size=13]CREATE TABLE IF NOT EXISTS `groups_requests` ([/size][/size][/justify]
[justify][size=16][size=13] `group_id` INT(11) UNSIGNED NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] `user_id` INT(11) UNSIGNED NOT NULL,[/size][/size][/justify]
[justify][size=16][size=13] KEY `groupid` (`group_id`) USING BTREE,[/size][/size][/justify]
[justify][size=16][size=13] KEY `userid` (`user_id`) USING BTREE[/size][/size][/justify]
[justify][size=16][size=13]) ENGINE=InnoDB DEFAULT CHARSET=latin1;[/size][/size][/justify]




Redémarrez votre ému, vous pouvez dès à présent créer des groupes sans plus buguer !


Fix n°3 : SuperWireds
Merci DJGOMEZV de chez Kekomundo




Ajoutez ce code à votre database : 





Code:
ALTER TABLE `permissions_ranks` ADD `fuse_use_superwired` enum('0','1') NOT NULL DEFAULT '1';
ALTER TABLE `permissions_ranks` ADD `fuse_any_rooms_rights` enum('0','1') NOT NULL DEFAULT '1';


Ensuite, rendez vous dans le dossier de votre émulateur ici : 




Azure.Emulator/HabboHotel/Roles et ouvrez le fichier "RoleManager.cs"

Une fois ouvert, supprimer tout le code, et remplacez-le par celui-ci :




Code:
#region


using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using Azure.Configuration;
using Azure.Database.Manager.Database.Session_Details.Interfaces;


#endregion


namespace Azure.HabboHotel.Roles
{
    ///
    /// Class RoleManager.
    ///
    internal class RoleManager
    {
        public Dictionary CommandsList = new Dictionary();
        public Dictionary PetCommandsList = new Dictionary();
        public Dictionary RankBadge = new Dictionary();
        private Dictionary RankFlood = new Dictionary();
        private Dictionary> RankPermissions = new Dictionary>();
        private Dictionary> UserPermissions = new Dictionary>();


        public void ClearPermissions()
        {
            this.RankBadge.Clear();
            this.UserPermissions.Clear();
            this.RankPermissions.Clear();
            this.RankFlood.Clear();
        }


        public bool ContainsRank(uint Rank)
        {
            return this.RankPermissions.ContainsKey(Rank);
        }


        public bool ContainsUser(uint UserID)
        {
            return this.UserPermissions.ContainsKey(UserID);
        }


        public int FloodTime(uint RankId)
        {
            return this.RankFlood[RankId];
        }


        public List GetRightsForHabbo(uint UserID, uint Rank)
        {
            List list = new List();
            if (this.ContainsUser(UserID))
            {
                return this.UserPermissions[UserID];
            }
            return this.RankPermissions[Rank];
        }


        public void LoadRights(IQueryAdapter dbClient)
        {
            this.ClearPermissions();
            dbClient.SetQuery("SELECT * FROM ranks ORDER BY id DESC;");
            DataTable table = dbClient.GetTable();
            if (table != null)
            {
                foreach (DataRow row in table.Rows)
                {
                    this.RankBadge.Add((uint)row["id"], row["badgeid"].ToString());
                }
            }
            dbClient.SetQuery("SELECT * FROM permissions_ranks ORDER BY rank DESC;");
            table = dbClient.GetTable();
            if (table != null)
            {
                foreach (DataRow row3 in table.Rows)
                {

                }
                foreach (DataRow row in table.Rows)
                {
                    this.RankFlood.Add((uint)row["rank"], (int)row["floodtime"]);


                    List list = new List();
                    if (AzureEmulator.EnumToBool(row["support_tool"].ToString()))
                    {
                        list.Add("support_tool");
                    }
                    if (AzureEmulator.EnumToBool(row["ambassadeur"].ToString()))
                    {
                        list.Add("ambassadeur");
                    }
                    if (AzureEmulator.EnumToBool(row["moderator"].ToString()))
                    {
                        list.Add("moderator");
                    }
                    if (AzureEmulator.EnumToBool(row["manager"].ToString()))
                    {
                        list.Add("manager");
                    }
                    if (AzureEmulator.EnumToBool(row["admin"].ToString()))
                    {
                        list.Add("admin");
                    }
                    if (AzureEmulator.EnumToBool(row["staff_chat"].ToString()))
                    {
                        list.Add("staff_chat");
                    }
                    if (AzureEmulator.EnumToBool(row["user_is_staff"].ToString())

Et enregistrez, puis redémarrer votre émulateur.




Fix n°4 : :hal




Merci Jacob Lucado de Kekomundo.




Rendez-vous dans le fichier RoleManager.cs, puis à la ligne : 


Code:
if (AzureEmulator.EnumToBool(row["owner"].ToString()))
                    {
                        list.Add("owner");
                    }


Exemple : Editez "owner" par "manager" 


Fix n°5 : Pour cette erreur 


System.ArgumentException: Column 'look' does not belong to table .
at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
at Azure.HabboHotel.Users.UserDataManagement.UserDataFactory.GetUserData(String sessionTicket, UInt32& errorCode) in C:\Users\Jacob Lucado\Desktop\Luc\Azure\Azure.Emulator\HabboHotel\Users\UserDataManagement\UserDataFactory.cs:line 246



Rendez vous sur le fichier "UserDataFactory.cs" de votre émulateur et remplacez tout le code par celui-ci : 



Code:
#region

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using Azure.HabboHotel.Achievements;
using Azure.HabboHotel.Catalogs;
using Azure.HabboHotel.Groups.Structs;
using Azure.HabboHotel.Items;
using Azure.HabboHotel.Pets;
using Azure.HabboHotel.RoomBots;
using Azure.HabboHotel.Rooms;
using Azure.HabboHotel.Users.Authenticator;
using Azure.HabboHotel.Users.Badges;
using Azure.HabboHotel.Users.Inventory;
using Azure.HabboHotel.Users.Messenger;
using Azure.HabboHotel.Users.Relationships;
using Azure.HabboHotel.Users.Subscriptions;

#endregion

namespace Azure.HabboHotel.Users.UserDataManagement
{
 ///
 /// Class UserDataFactory.
 ///
 internal class UserDataFactory
 {
 ///
 /// Gets the user data.
 ///
 /// The session ticket.
 /// The ip.
 /// The error code.
 /// UserData.
 ///
 internal static UserData GetUserData(string sessionTicket, out uint errorCode)
 {
 uint userid = 0, miniMailCount = 0;
 errorCode = 1;

 DataTable groupsTable;
 DataRow dataRow;
 DataTable achievementsTable;
 DataTable talentsTable;
 DataRow statsTable;
 DataTable favoritesTable;
 DataTable ignoresTable;
 DataTable tagsTable;
 DataRow subscriptionsRow;
 DataTable badgesTable;
 DataTable itemsTable;
 DataTable effectsTable;
 DataTable pollsTable;
 DataTable friendsTable;
 DataTable friendsRequestsTable;
 DataTable myRoomsTable;
 DataTable petsTable;
 DataTable questsTable;
 DataTable botsTable;
 DataTable relationShipsTable;

 try
 {
 using (var queryReactor = AzureEmulator.GetDatabaseManager().GetQueryReactor())
 {
 queryReactor.SetQuery("SELECT * FROM users WHERE auth_ticket = @ticket");
 queryReactor.AddParameter("ticket", sessionTicket);
 dataRow = queryReactor.GetRow();
 if (dataRow == null)
 return null;

 errorCode = 0;
 userid = Convert.ToUInt32(dataRow["id"]);

 queryReactor.RunFastQuery(string.Format("UPDATE users SET online = '1' WHERE id = '{0}'", userid));
 if (AzureEmulator.GetGame().GetClientManager().GetClientByUserId(userid) != null)
 AzureEmulator.GetGame().GetClientManager().GetClientByUserId(userid).Disconnect("User connected in other place");

 queryReactor.SetQuery(string.Format("SELECT `group`, `level`, progress FROM users_achievements WHERE userid = {0}", Convert.ToUInt32(userid)));
 achievementsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT talent_id, talent_state FROM users_talents WHERE userid = {0}", Convert.ToUInt32(userid)));
 talentsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT COUNT(*) FROM users_stats WHERE id = {0}", Convert.ToUInt32(userid)));
 if (int.Parse(queryReactor.GetString()) == 0)
 queryReactor.RunFastQuery(string.Format("INSERT INTO users_stats (id) VALUES ({0})", Convert.ToUInt32(userid)));

 queryReactor.SetQuery(string.Format("SELECT room_id FROM users_favorites WHERE user_id = {0}", Convert.ToUInt32(userid)));
 favoritesTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT ignore_id FROM users_ignores WHERE user_id = {0}", Convert.ToUInt32(userid)));
 ignoresTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT tag FROM users_tags WHERE user_id = {0}", Convert.ToUInt32(userid)));
 tagsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT subscription_id, timestamp_activated, timestamp_expire, timestamp_lastgift FROM users_subscriptions WHERE user_id = {0} AND timestamp_expire > UNIX_TIMESTAMP() ORDER BY subscription_id DESC LIMIT 1", Convert.ToUInt32(userid)));
 subscriptionsRow = queryReactor.GetRow();

 queryReactor.SetQuery(string.Format("SELECT * FROM users_badges WHERE user_id = {0}", Convert.ToUInt32(userid)));
 badgesTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT `items_rooms`.* , COALESCE(`items_groups`.`group_id`, 0) AS group_id FROM `items_rooms` LEFT OUTER JOIN `items_groups` ON `items_rooms`.`id` = `items_groups`.`id` WHERE room_id='0' AND user_id={0} LIMIT 8000", Convert.ToUInt32(userid)));
 itemsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT * FROM users_effects WHERE user_id = {0}", Convert.ToUInt32(userid)));
 effectsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT poll_id FROM users_polls WHERE user_id = {0} GROUP BY poll_id;", Convert.ToUInt32(userid)));
 pollsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT users.id,users.username,users.motto,users.look,users.last_online,users.hide_inroom,users.hide_online FROM users JOIN messenger_friendships ON users.id = messenger_friendships.user_one_id WHERE messenger_friendships.user_two_id = {0} UNION ALL SELECT users.id,users.username,users.motto,users.look,users.last_online,users.hide_inroom,users.hide_online FROM users JOIN messenger_friendships ON users.id = messenger_friendships.user_two_id WHERE messenger_friendships.user_one_id = {0}", Convert.ToUInt32(userid)));
 friendsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT * FROM users_stats WHERE id = {0}", Convert.ToUInt32(userid)));
 statsTable = queryReactor.GetRow();

 queryReactor.SetQuery(string.Format("SELECT messenger_requests.from_id,messenger_requests.to_id,users.Username FROM users JOIN messenger_requests ON users.id = messenger_requests.from_id WHERE messenger_requests.to_id = {0}", Convert.ToUInt32(userid)));
 friendsRequestsTable = queryReactor.GetTable();

 queryReactor.SetQuery("SELECT * FROM rooms_data WHERE owner = @name LIMIT 150");
 queryReactor.AddParameter("name", dataRow["username"]);
 myRoomsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT * FROM bots WHERE user_id = {0} AND room_id = 0 AND ai_type='pet'", Convert.ToUInt32(userid)));
 petsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT quest_id, progress FROM users_quests_data WHERE user_id = {0}", Convert.ToUInt32(userid)));
 questsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT * FROM bots WHERE user_id = {0} AND room_id=0 AND ai_type='generic'", Convert.ToUInt32(userid)));
 botsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("SELECT group_id,rank,date_join FROM groups_members WHERE user_id = {0}", Convert.ToUInt32(userid)));
 groupsTable = queryReactor.GetTable();

 queryReactor.SetQuery(string.Format("UPDATE users_info SET login_timestamp = '{1}' WHERE user_id = {0}", Convert.ToUInt32(userid), AzureEmulator.GetUnixTimeStamp()));
 queryReactor.RunQuery();

 queryReactor.SetQuery(string.Format("SELECT * FROM users_relationships WHERE user_id = {0}", Convert.ToUInt32(userid)));
 relationShipsTable = queryReactor.GetTable();

 //queryReactor.SetQuery(string.Format("SELECT Count( IsReaded ) FROM xdrcms_minimail WHERE InBin = 0 AND IsReaded = 0 AND SenderId != {0} AND OwnerId = {0}", Convert.ToUInt32(userid)));
 //miniMailCount = (uint)queryReactor.GetInteger();

 queryReactor.RunFastQuery(string.Format("UPDATE users SET online='1' WHERE id = {0} LIMIT 1", Convert.ToUInt32(userid)));
 }

 var achievements = new Dictionary();
 foreach (DataRow row in achievementsTable.Rows)
 {
 var text = (string)row["group"];
 var level = (int)row["level"];
 var progress = (int)row["progress"];
 var value = new UserAchievement(text, level, progress);
 achievements.Add(text, value);
 }

 var talents = new Dictionary();
 foreach (DataRow row in talentsTable.Rows)
 {
 var num2 = (int)row["talent_id"];
 var state = (int)row["talent_state"];
 var value2 = new UserTalent(num2, state);
 talents.Add(num2, value2);
 }

 var favorites = (from DataRow row in favoritesTable.Rows select (uint)row["room_id"]).ToList();
 var ignoreUsers = (from DataRow row in ignoresTable.Rows select (uint)row["ignore_id"]).ToList();
 var tags = (from DataRow row in tagsTable.Rows select row["tag"].ToString().Replace(" ", "")).ToList();
 var inventoryBots =
 (from DataRow row2 in botsTable.Rows select BotManager.GenerateBotFromRow(row2)).ToDictionary(
 roomBot => roomBot.BotId);
 var badges =
 (from DataRow dataRow8 in badgesTable.Rows
 select new Badge((string)dataRow8["badge_id"], (int)dataRow8["badge_slot"])).ToList();

 Subscription subscriptions = null;
 if (subscriptionsRow != null)
 subscriptions = new Subscription((int)subscriptionsRow["subscription_id"],
 (int)subscriptionsRow["timestamp_activated"], (int)subscriptionsRow["timestamp_expire"],
 (int)subscriptionsRow["timestamp_lastgift"]);

 var items = new List();
 foreach (DataRow row in itemsTable.Rows)
 {
 var id = Convert.ToUInt32(row[0]);
 var itemId = Convert.ToUInt32(row[3]);

 if (!AzureEmulator.GetGame().GetItemManager().ContainsItem(itemId))
 continue;

 var extraData = !DBNull.Value.Equals(row[4]) ? (string)row[4] : string.Empty;

 var group = Convert.ToInt32(row["group_id"]);
 var songCode = (string)row["songcode"];
 items.Add(new UserItem(id, itemId, extraData, group, songCode));
 }

 var effects = (from DataRow row in effectsTable.Rows
 let effectId = (int)row["effect_id"]
 let totalDuration = (int)row["total_duration"]
 let activated = AzureEmulator.EnumToBool((string)row["is_activated"])
 let activateTimestamp = (double)row["activated_stamp"]
 let type = Convert.ToInt16(row["type"])
 select new AvatarEffect(effectId, totalDuration, activated, activateTimestamp, type)).ToList();

 var pollSuggested = new HashSet();
 foreach (uint pId in from DataRow row in pollsTable.Rows select (uint)row["poll_id"])
 pollSuggested.Add(pId);

 var friends = new Dictionary();
 var limit = (friendsTable.Rows.Count - 700);

 if (limit > 0)
 using (var queryreactor2 = AzureEmulator.GetDatabaseManager().GetQueryReactor())
 {
 queryreactor2.RunFastQuery(string.Concat("DELETE FROM messenger_friendships WHERE user_one_id=", userid, " OR user_two_id=", userid, " LIMIT ", limit));
 queryreactor2.SetQuery(string.Concat("SELECT users.id,users.username,users.motto,users.look,users.last_online,users.hide_inroom,users.hide_online FROM users JOIN messenger_friendships ON users.id = messenger_friendships.user_one_id WHERE messenger_friendships.user_two_id = ", userid, " UNION ALL SELECT users.id,users.username,users.motto,users.look,users.last_online,users.hide_inroom,users.hide_online FROM users JOIN messenger_friendships ON users.id = messenger_friendships.user_two_id WHERE messenger_friendships.user_one_id = ", userid));
 friendsTable = queryreactor2.GetTable();
 }

 foreach (DataRow row in friendsTable.Rows)
 {
 var num4 = Convert.ToUInt32(row["id"]);
 var pUsername = (string)row["username"];
 var pLook = (string)row["look"];
 var pMotto = (string)row["motto"];
 var pLastOnline = Convert.ToInt32(row["last_online"]);
 var pAppearOffline = AzureEmulator.EnumToBool(row["hide_online"].ToString());
 var pHideInroom = AzureEmulator.EnumToBool(row["hide_inroom"].ToString());
 if (num4 != userid && !friends.ContainsKey(num4))
 friends.Add(num4,
 new MessengerBuddy(num4, pUsername, pLook, pMotto, pLastOnline, pAppearOffline, pHideInroom));
 }

 var friendsRequests = new Dictionary();
 foreach (DataRow row in friendsRequestsTable.Rows)
 {
 var num5 = Convert.ToUInt32(row["from_id"]);
 var num6 = Convert.ToUInt32(row["to_id"]);
 string pUsername2 = row["username"].ToString();
 string pUsername = row["username"].ToString();
 if (num5 != userid)
 if (!friendsRequests.ContainsKey(num5))
 friendsRequests.Add(num5, new MessengerRequest(userid, num5, pUsername2, pUsername));
 else if (!friendsRequests.ContainsKey(num6))
 friendsRequests.Add(num6, new MessengerRequest(userid, num6, pUsername2, pUsername));
 }

 var myRooms = new HashSet();
 foreach (DataRow row in myRoomsTable.Rows)
 {
 var roomId = Convert.ToUInt32(row["id"]);
 myRooms.Add(AzureEmulator.GetGame().GetRoomManager().FetchRoomData(roomId, row));
 }

 var pets = new Dictionary();
 foreach (DataRow row in petsTable.Rows)
 using (var queryreactor3 = AzureEmulator.GetDatabaseManager().GetQueryReactor())
 {
 queryreactor3.SetQuery(string.Format("SELECT * FROM pets_data WHERE id={0} LIMIT 1", row[0]));
 var row3 = queryreactor3.GetRow();
 if (row3 == null)
 continue;
 var pet = Catalog.GeneratePetFromRow(row, row3);
 pets.Add(pet.PetId, pet);
 }

 var quests = new Dictionary();
 foreach (DataRow row in questsTable.Rows)
 {
 var key = Convert.ToUInt32(row["quest_id"]);
 var value3 = (int)row["progress"];
 if (quests.ContainsKey(key))
 quests.Remove(key);
 quests.Add(key, value3);
 }

 var groups = new List();
 foreach (DataRow row in groupsTable.Rows)
 groups.Add(new GroupUser(userid, (int)row["group_id"], (int)row["rank"], (int)row["date_join"]));

 var relationShips = relationShipsTable.Rows.Cast()
 .ToDictionary(row => (int)row[0],
 row => new Relationship((int)row[0], (int)row[2], Convert.ToInt32(row[3].ToString())));

 var user = HabboFactory.GenerateHabbo(dataRow, statsTable, groups);
 //dataRow = null;
 //achievementsTable = null;
 //favoritesTable = null;
 //ignoresTable = null;
 //tagsTable = null;
 //subscriptionsRow = null;
 //badgesTable = null;
 //itemsTable = null;
 //effectsTable = null;
 //friendsTable = null;
 //friendsRequestsTable = null;
 //myRoomsTable = null;
 //petsTable = null;
 //botsTable = null;
 //relationShipsTable = null;
 //pollsTable = null;

 errorCode = 0;
 if (user.HasFuse("staff_chat"))
 {
 friends.Add(0, new MessengerBuddy(0, "Staff Chat", "hr-831-45.fa-1206-91.sh-290-1331.ha-3129-100.hd-180-2.cc-3039-73.ch-3215-92.lg-270-73", string.Empty, 0, false, true));
 }

 return new UserData(userid, achievements, talents, favorites, ignoreUsers, tags, subscriptions, badges,
 items, effects, friends, friendsRequests, myRooms, pets, quests, user, inventoryBots, relationShips,
 pollSuggested, miniMailCount);
 }
 catch (Exception e)
 {
 errorCode = 1;
 Writer.Writer.LogException(e.ToString());
 return null;
 }
 }

 ///
 /// Gets the user data.
 ///
 /// The user identifier.
 /// UserData.
 internal static UserData GetUserData(int userId)
 {
 DataRow dataRow;
 uint num;
 DataRow row;
 DataTable table;
 using (var queryReactor = AzureEmulator.GetDatabaseManager().GetQueryReactor())
 {
 queryReactor.SetQuery(string.Format("SELECT * FROM users WHERE id = '{0}'", userId));
 dataRow = queryReactor.GetRow();
 AzureEmulator.GetGame().GetClientManager().LogClonesOut(Convert.ToUInt32(userId));
 if (dataRow == null)
 return null;
 num = Convert.ToUInt32(dataRow["id"]);
 if (AzureEmulator.GetGame().GetClientManager().GetClientByUserId(num) != null)
 return null;
 queryReactor.SetQuery(string.Format("SELECT group_id,rank,date_join FROM groups_members WHERE user_id={0}", userId));
 queryReactor.GetTable();
 queryReactor.SetQuery(string.Format("SELECT * FROM users_stats WHERE id={0} LIMIT 1", num));
 row = queryReactor.GetRow();

 if (row == null)
 {

 }
 queryReactor.SetQuery("SELECT * FROM users_relationships WHERE user_id=@id");
 queryReactor.AddParameter("id", num);
 table = queryReactor.GetTable();
 }
 var achievements = new Dictionary();
 var talents = new Dictionary();
 var favouritedRooms = new List();
 var ignores = new List();
 var tags = new List();
 var badges = new List();
 var inventory = new List();
 var effects = new List();
 var friends = new Dictionary();
 var requests = new Dictionary();
 var rooms = new HashSet();
 var pets = new Dictionary();
 var quests = new Dictionary();
 var bots = new Dictionary();
 var group = new List();
 var pollData = new HashSet();
 var dictionary = table.Rows.Cast()
 .ToDictionary(dataRow2 => (int)dataRow2[0],
 dataRow2 =>
 new Relationship((int)dataRow2[0], (int)dataRow2[2], Convert.ToInt32(dataRow2[3].ToString())));
 var user = HabboFactory.GenerateHabbo(dataRow, row, group);
 dataRow = null;

 return new UserData(num, achievements, talents, favouritedRooms, ignores, tags, null, badges, inventory,
 effects, friends, requests, rooms, pets, quests, user, bots, dictionary, pollData, 0);
 }
 }
}
Enregistrez et le tour est joué !


Voilà pour le tuto, j'ai pris du temps à traduire les étapes de fixage qui sont normalement en espagnol, j'ai testé, et ça a fonctionné parfaitement de mon côté !

Je tiens à préciser, qu'il est important d'effectuer ces modifications sur un AzureEmulateur générer et disponible en dossier source, bien sûr, une fois toutes les modifications effectués, il est important de vous rendre sur le fichier regroupant tout les autres fichiers, de l'éditer, et de cliquer sur "Build" puis sur "Générer la solution" si l'émulateur n'est pas encore généré, s'il l'est, il est important de suivre les mêmes étapes et de cliquer sur "Régénérer la solution". Bien sûr, ce guide est destiné aux utilisateurs ayant un minimum de compétences en développement. Si une erreur subviens, je ne me tiendrais pas pour responsable.


Alors avant d'effectuer les fix's, réfléchissez bien !

Bon jeu à vous
Revenir en haut Aller en bas
Voir le profil de l'utilisateur http://pandaco.fra.co
 
[Tutoriel] Guide Fixage AzureEmulateur
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» bracelet bresilien avec lettrage
» Guide peinture WW2
» [FORUM] Le Guide du débutant.
» Guide des programmes - Cablecom
» Guide+ et décodeur numérique UPC Thomson

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Pandaco :: 
Tutoriels
-
Sauter vers: