mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 05:05:53 +12:00
no message
This commit is contained in:
parent
3183bf2b3e
commit
5820181182
2 changed files with 38 additions and 3 deletions
34
Horse Isle Server/Horse Isle Server/Messages.cs
Normal file
34
Horse Isle Server/Horse Isle Server/Messages.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Horse_Isle_Server
|
||||
{
|
||||
class Messages
|
||||
{
|
||||
|
||||
public static string LoginMessage(string username)
|
||||
{
|
||||
return Gamedata.LoginMessage.Replace("%USERNAME%", username);
|
||||
}
|
||||
|
||||
public static string LocationData(int x, int y)
|
||||
{
|
||||
string message = "";
|
||||
try
|
||||
{
|
||||
World.Isle isle = World.GetIsle(x, y);
|
||||
message = Gamedata.AreaMessage.Replace("%AREA%", isle.Name);
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
int[] itemIds = World.GetDroppedItems(x, y);
|
||||
if (itemIds.Length == 0)
|
||||
message += Gamedata.NothingMessage;
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue