properly handle area change in same area
This commit is contained in:
parent
ee9ffa7f2a
commit
7312097063
@ -195,6 +195,11 @@ void AOClient::handlePacket(AOPacket packet)
|
|||||||
|
|
||||||
void AOClient::changeArea(int new_area)
|
void AOClient::changeArea(int new_area)
|
||||||
{
|
{
|
||||||
|
// TODO: function to send chat messages with hostname automatically
|
||||||
|
if (current_area == new_area) {
|
||||||
|
sendPacket("CT", {"Server", "You are already in area " + server->area_names[current_area], "1"});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (current_char != "") {
|
if (current_char != "") {
|
||||||
server->areas.value(current_area)->characters_taken[current_char] =
|
server->areas.value(current_area)->characters_taken[current_char] =
|
||||||
false;
|
false;
|
||||||
|
Loading…
Reference in New Issue
Block a user