mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-10 23:25:41 +12:00
Allow for formatting codes in profile ..
This commit is contained in:
parent
3b6d416a4a
commit
c0355ad755
1 changed files with 9 additions and 5 deletions
|
@ -39,13 +39,13 @@ namespace HISP.Server
|
|||
* eg: OnMovementPacket is whenever the server receies a movement request from the client.
|
||||
*/
|
||||
|
||||
public static void OnCrossdomainPolicyRequest(GameClient sender) // When a cross-domain-policy request is received.
|
||||
public static void OnCrossdomainPolicyRequest(GameClient sender)
|
||||
{
|
||||
Logger.DebugPrint("Cross-Domain-Policy request received from: " + sender.RemoteIp);
|
||||
|
||||
byte[] crossDomainPolicyResponse = CrossDomainPolicy.GetPolicy(); // Generate response packet
|
||||
byte[] crossDomainPolicyResponse = CrossDomainPolicy.GetPolicy();
|
||||
|
||||
sender.SendPacket(crossDomainPolicyResponse); // Send to client.
|
||||
sender.SendPacket(crossDomainPolicyResponse);
|
||||
}
|
||||
public static void OnUserInfoRequest(GameClient sender, byte[] packet)
|
||||
{
|
||||
|
@ -138,7 +138,10 @@ namespace HISP.Server
|
|||
if (method == PacketBuilder.VIEW_PROFILE)
|
||||
{
|
||||
sender.LoggedinUser.MetaPriority = true;
|
||||
byte[] profilePacket = PacketBuilder.CreateProfilePacket(sender.LoggedinUser.ProfilePage);
|
||||
string profilePage = sender.LoggedinUser.ProfilePage;
|
||||
profilePage = profilePage.Replace("<", "[");
|
||||
profilePage = profilePage.Replace(">", "]");
|
||||
byte[] profilePacket = PacketBuilder.CreateProfilePacket(profilePage);
|
||||
sender.SendPacket(profilePacket);
|
||||
}
|
||||
else if (method == PacketBuilder.SAVE_PROFILE)
|
||||
|
@ -155,7 +158,8 @@ namespace HISP.Server
|
|||
|
||||
string profilePage = packetStr.Split('|')[1];
|
||||
profilePage = profilePage.Substring(0, profilePage.Length - 2);
|
||||
|
||||
profilePage = profilePage.Replace("[", "<");
|
||||
profilePage = profilePage.Replace("]", ">");
|
||||
sender.LoggedinUser.CharacterId = characterId;
|
||||
sender.LoggedinUser.ProfilePage = profilePage;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue