ECCO I NUOVI FIX PER UN TUO SERVER MIGLIORE:
FONTE: KEKOMUNDO
private void PetsCommands()
{
Room Room = UberEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (Room == null)
{
return;
}
int PetId = Request.PopWiredInt32();
int PetUser = Room.GetPet(PetId);
HabboHotel.Users.Habbo Habbo = Session.GetHabbo();
if (PetUser != -1 && Room.UserList[PetUser].PetData != null && Room.UserList[PetUser].PetData.OwnerId == Habbo.Id)
{
GetResponse().Init(605);
GetResponse().AppendInt32(PetId);
int cmds = 32;
GetResponse().AppendInt32(cmds);
for (int i = 0; i <= cmds; i++)
{
GetResponse().AppendInt32(i);
}
if (Room.UserList[PetUser].PetData.Level < cmds)
{
cmds = Room.UserList[PetUser].PetData.Level;
}
for (int i = 0; i < cmds; i++)
{
GetResponse().AppendInt32(i);
}
SendResponse();
}
}
SCREEN:private void PetRaces()
{
string PetType = Request.PopFixedString();
int count = 0, petid = 0;
GetResponse().Init(827);
if (PetType[6] == '0')
{
GetResponse().AppendStringWithBreak("a0 pet0");
count = 25;
petid = 0;
}
else if (PetType[6] == '1')
{
if (PetType.Length == 8)
{
if (PetType[7] == '1')
{
GetResponse().AppendStringWithBreak("a0 pet11");
count = 14;
petid = 11;
}
}
else
{
GetResponse().AppendStringWithBreak("a0 pet1");
count = 25;
petid = 1;
}
}
else if (PetType[6] == '2')
{
GetResponse().AppendStringWithBreak("a0 pet2");
count = 12;
petid = 2;
}
else if (PetType[6] == '3')
{
GetResponse().AppendStringWithBreak("a0 pet3");
count = 7;
petid = 3;
}
else if (PetType[6] == '4')
{
GetResponse().AppendStringWithBreak("a0 pet4");
count = 4;
petid = 4;
}
else if (PetType[6] == '5')
{
GetResponse().AppendStringWithBreak("a0 pet5");
count = 7;
petid = 5;
}
else if (PetType[6] == '6')
{
GetResponse().AppendStringWithBreak("a0 pet6");
count = 13;
petid = 6;
}
else if (PetType[6] == '7')
{
GetResponse().AppendStringWithBreak("a0 pet7");
count = 8;
petid = 7;
}
else if (PetType[6] == '8')
{
GetResponse().AppendStringWithBreak("a0 pet8");
count = 13;
petid = 8;
}
GetResponse().AppendInt32(count);
for (int i = 0; i < count; i++)
{
GetResponse().AppendInt32(petid); // pet id
GetResponse().AppendInt32(i); // raza id
GetResponse().AppendInt32(1); // activado
GetResponse().AppendInt32(0); // desactivado wtf?
}
SendResponse();
}
-------------------------------------