forked from metin2/server
Rewrote network stack, started working on porting to 64-bit
This commit is contained in:
@@ -87,7 +87,7 @@ ACMD(do_pcbang_update)
|
||||
char arg1[256];
|
||||
one_argument(argument, arg1, sizeof(arg1));
|
||||
|
||||
unsigned long PCBangID = 0;
|
||||
unsigned int PCBangID = 0;
|
||||
|
||||
if (*arg1 == '\0')
|
||||
PCBangID = 0;
|
||||
@@ -852,7 +852,7 @@ ACMD(do_mob_ld)
|
||||
}
|
||||
|
||||
int dir = 1;
|
||||
long x, y;
|
||||
int x, y;
|
||||
|
||||
if (*arg2)
|
||||
str_to_number(x, arg2);
|
||||
@@ -974,22 +974,22 @@ ACMD(do_state)
|
||||
snprintf(buf, sizeof(buf), "%s's State: ", tch->GetName());
|
||||
|
||||
if (tch->IsPosition(POS_FIGHTING))
|
||||
strncat(buf, "Battle", sizeof(buf));
|
||||
strncat(buf, "Battle", sizeof(buf) - strlen(buf) - 1);
|
||||
else if (tch->IsPosition(POS_DEAD))
|
||||
strncat(buf, "Dead", sizeof(buf));
|
||||
strncat(buf, "Dead", sizeof(buf) - strlen(buf) - 1);
|
||||
else
|
||||
strncat(buf, "Standing", sizeof(buf));
|
||||
strncat(buf, "Standing", sizeof(buf) - strlen(buf) - 1);
|
||||
|
||||
if (ch->GetShop())
|
||||
strncat(buf, ", Shop", sizeof(buf));
|
||||
strncat(buf, ", Shop", sizeof(buf) - strlen(buf) - 1);
|
||||
|
||||
if (ch->GetExchange())
|
||||
strncat(buf, ", Exchange", sizeof(buf));
|
||||
strncat(buf, ", Exchange", sizeof(buf) - strlen(buf) - 1);
|
||||
|
||||
ch->ChatPacket(CHAT_TYPE_INFO, "%s", buf);
|
||||
|
||||
int len;
|
||||
len = snprintf(buf, sizeof(buf), "Coordinate %ldx%ld (%ldx%ld)",
|
||||
len = snprintf(buf, sizeof(buf), "Coordinate %dx%d (%dx%d)",
|
||||
tch->GetX(), tch->GetY(), tch->GetX() / 100, tch->GetY() / 100);
|
||||
|
||||
if (len < 0 || len >= (int) sizeof(buf))
|
||||
@@ -1000,7 +1000,7 @@ ACMD(do_state)
|
||||
if (pSec)
|
||||
{
|
||||
TMapSetting& map_setting = SECTREE_MANAGER::instance().GetMap(tch->GetMapIndex())->m_setting;
|
||||
snprintf(buf + len, sizeof(buf) - len, " MapIndex %ld Attribute %08X Local Position (%ld x %ld)",
|
||||
snprintf(buf + len, sizeof(buf) - len, " MapIndex %d Attribute %08X Local Position (%d x %d)",
|
||||
tch->GetMapIndex(), pSec->GetAttribute(tch->GetX(), tch->GetY()), (tch->GetX() - map_setting.iBaseX)/100, (tch->GetY() - map_setting.iBaseY)/100);
|
||||
}
|
||||
|
||||
@@ -1754,8 +1754,8 @@ ACMD(do_private)
|
||||
return;
|
||||
}
|
||||
|
||||
long lMapIndex;
|
||||
long map_index = 0;
|
||||
int lMapIndex;
|
||||
int map_index = 0;
|
||||
str_to_number(map_index, arg1);
|
||||
if ((lMapIndex = SECTREE_MANAGER::instance().CreatePrivateMap(map_index)))
|
||||
{
|
||||
@@ -2705,7 +2705,7 @@ ACMD(do_vote_block_chat)
|
||||
}
|
||||
|
||||
const char* name = arg1;
|
||||
long lBlockDuration = 10;
|
||||
int lBlockDuration = 10;
|
||||
sys_log(0, "vote_block_chat %s %d", name, lBlockDuration);
|
||||
|
||||
LPCHARACTER tch = CHARACTER_MANAGER::instance().FindPC(name);
|
||||
@@ -2764,7 +2764,7 @@ ACMD(do_block_chat)
|
||||
}
|
||||
|
||||
const char* name = arg1;
|
||||
long lBlockDuration = parse_time_str(argument);
|
||||
int lBlockDuration = parse_time_str(argument);
|
||||
|
||||
if (lBlockDuration < 0)
|
||||
{
|
||||
@@ -2956,9 +2956,9 @@ ACMD(do_build)
|
||||
}
|
||||
*/
|
||||
|
||||
long map_x = 0;
|
||||
int map_x = 0;
|
||||
str_to_number(map_x, arg2);
|
||||
long map_y = 0;
|
||||
int map_y = 0;
|
||||
str_to_number(map_y, arg3);
|
||||
|
||||
bool isSuccess = pkLand->RequestCreateObject(dwVnum,
|
||||
@@ -3234,7 +3234,7 @@ ACMD(do_save_attribute_to_image) // command "/saveati" for alias
|
||||
return;
|
||||
}
|
||||
|
||||
long lMapIndex = 0;
|
||||
int lMapIndex = 0;
|
||||
str_to_number(lMapIndex, szMapIndex);
|
||||
|
||||
if (SECTREE_MANAGER::instance().SaveAttributeToImage(lMapIndex, szFileName))
|
||||
@@ -3932,7 +3932,7 @@ ACMD(do_set_stat)
|
||||
|
||||
two_arguments (argument, szName, sizeof (szName), szChangeAmount, sizeof(szChangeAmount));
|
||||
|
||||
if (*szName == NULL || *szChangeAmount == '\0')
|
||||
if (*szName == '\0' || *szChangeAmount == '\0')
|
||||
{
|
||||
ch->ChatPacket (CHAT_TYPE_INFO, "Invalid argument.");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user