diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-07-11 07:05:05 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-07-11 07:05:05 +0000 |
commit | 1dbe79304e33952023f3219ce6c891f7bad3000a (patch) | |
tree | e94092039d99824f9c5f165979e2d69f92c04a69 | |
parent | 3317a790778189da1ad69f75947c519f0d0b3563 (diff) | |
download | hercules-1dbe79304e33952023f3219ce6c891f7bad3000a.tar.gz hercules-1dbe79304e33952023f3219ce6c891f7bad3000a.tar.bz2 hercules-1dbe79304e33952023f3219ce6c891f7bad3000a.tar.xz hercules-1dbe79304e33952023f3219ce6c891f7bad3000a.zip |
Some insignificant code tweaks.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13945 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/char/char.c | 7 | ||||
-rw-r--r-- | src/login/account_txt.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 1 | ||||
-rw-r--r-- | src/plugins/dbghelpplug.c | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/char/char.c b/src/char/char.c index 25c5391ef..d7eb63a77 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -197,7 +197,7 @@ void set_char_online(int map_id, int char_id, int account_id) struct online_char_data* character; character = (struct online_char_data*)idb_ensure(online_char_db, account_id, create_online_char_data); - if( character->char_id != -1 && character->server > -1 && character->server != map_id && map_id != -3 ) + if( character->char_id != -1 && character->server > -1 && character->server != map_id ) { //char == 99 <- Character logging in, so someone has logged in while one //char is still on map-server, so kick him out, but don't print "error" @@ -253,7 +253,8 @@ void set_char_offline(int char_id, int account_id) //FIXME? Why Kevin free'd the online information when the char was effectively in the map-server? } - + + //Remove char if 1- Set all offline, or 2- character is no longer connected to char-server. if (login_fd > 0 && !session[login_fd]->flag.eof && (char_id == -1 || character == NULL || character->fd == -1)) { WFIFOHEAD(login_fd,6); @@ -1748,10 +1749,12 @@ int char_divorce(struct mmo_charstatus *cs) cs->partner_id = 0; char_dat[i].status.partner_id = 0; for(j = 0; j < MAX_INVENTORY; j++) + { if (char_dat[i].status.inventory[j].nameid == WEDDING_RING_M || char_dat[i].status.inventory[j].nameid == WEDDING_RING_F) memset(&char_dat[i].status.inventory[j], 0, sizeof(char_dat[i].status.inventory[0])); if (cs->inventory[j].nameid == WEDDING_RING_M || cs->inventory[j].nameid == WEDDING_RING_F) memset(&cs->inventory[j], 0, sizeof(cs->inventory[0])); + } return 0; } } diff --git a/src/login/account_txt.c b/src/login/account_txt.c index 6777c2062..ba3388c57 100644 --- a/src/login/account_txt.c +++ b/src/login/account_txt.c @@ -174,7 +174,7 @@ static bool account_db_txt_init(AccountDB* self) memcpy(tmp, &acc, sizeof(struct mmo_account)); idb_put(accounts, acc.account_id, tmp); - if( db->next_account_id < acc.account_id) + if( acc.account_id >= db->next_account_id ) db->next_account_id = acc.account_id + 1; } diff --git a/src/map/skill.c b/src/map/skill.c index eee0236a6..7d82e032c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7189,7 +7189,6 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un } break; case UNT_SAFETYWALL: - //TODO: Find a more reliable way to handle the link to sg, this could cause dangling pointers. [Skotlex] if (!sce) sc_start4(bl,type,100,sg->skill_lv,sg->group_id,sg->group_id,0,sg->limit); break; diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c index ad5f6b584..ef9c08534 100644 --- a/src/plugins/dbghelpplug.c +++ b/src/plugins/dbghelpplug.c @@ -108,7 +108,7 @@ typedef enum _UdtKind UdtClass, UdtUnion } UdtKind; - +/* typedef enum _SymTag { SymTagNull = 0, SymTagExe = 1, @@ -142,7 +142,7 @@ typedef enum _SymTag { SymTagManagedType = 29, SymTagDimension = 30 } SymTag; - +*/ #endif /* _NO_CVCONST_H */ |