- Made guild member exp an unsigned int.

- Modified npc_click to receive the bl that was clicked directly. Also cleaned it up so it isn't as easy to crash the server with invalid ids <.<
- Moved npc_checknear to npc_checknear2 and added npc_checknear. The near version receives a bl, checks it's validity, and returns a TBL_NPC object, near2 does the same but doesn't checks for type NPC. The first returns a pointer, the second returns 1 on fail, 0 success.
- Also uncommented various npc_checknear calls in the code, who's idea was to comment them out so you could exploit npcs from afar with custom packets?
- Added overflow checks for bonus settings mdef_rate/def_rate.
- Added missing update of INT after a buf. 
- Small cleanup of how SC_BLEEDING works.
- Fixed party_foreach_samemap invoking the function on the CASTER instead of on the party members.
- Added clif_parse_ActionRequest_sub to handle player commands, is used from npc_click or any other function that needs to "re-route" a player's request.
- Modified clif_parse_NpcClicked to handle the different situations with different bl-objects (attack on players/mobs, click on npcs or mobs with npc attached)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7103 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex
2006-06-12 14:55:35 +00:00
parent 9e02fa0329
commit 3b13b070e1
11 changed files with 138 additions and 116 deletions

View File

@@ -187,7 +187,7 @@ int inter_guild_tosql(struct guild *g,int flag)
if(m->account_id) {
//Since nothing references guild member table as foreign keys, it's safe to use REPLACE INTO
sprintf(tmp_sql,"REPLACE INTO `%s` (`guild_id`,`account_id`,`char_id`,`hair`,`hair_color`,`gender`,`class`,`lv`,`exp`,`exp_payper`,`online`,`position`,`name`) "
"VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%s')",
"VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%u','%d','%d','%d','%s')",
guild_member_db, g->guild_id, m->account_id,m->char_id,
m->hair,m->hair_color,m->gender,
m->class_,m->lv,m->exp,m->exp_payper,m->online,m->position,
@@ -1527,7 +1527,7 @@ int mapif_parse_GuildMemberInfoChange(int fd,int guild_id,int account_id,int cha
{ // EXP
unsigned int exp, old_exp=g->member[i].exp;
g->member[i].exp=*((unsigned int *)data);
if (g->member[i].exp > (signed int)old_exp && old_exp < INT_MAX)
if (g->member[i].exp > old_exp)
{
exp = g->member[i].exp - old_exp;
if (guild_exp_rate != 100)