Skip to content

Commit

Permalink
Fixed event OnBreakGuild not being triggered
Browse files Browse the repository at this point in the history
Fixes #1888
Thanks to @guilherme-gm
  • Loading branch information
Lemongrass3110 committed Jan 17, 2017
1 parent 633d50f commit 60652e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/common/mmo.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
#define PASSWD_LENGTH (32+1)
//NPC names can be longer than it's displayed on client (NAME_LENGTH).
#define NPC_NAME_LENGTH 50
// <NPC_NAME_LENGTH> for npc name + 2 for a "::" + <NAME_LENGTH> for label + 1 for EOS
#define EVENT_NAME_LENGTH ( NPC_NAME_LENGTH + 2 + NAME_LENGTH + 1 )
//For item names, which tend to have much longer names.
#define ITEM_NAME_LENGTH 50
//For Map Names, which the client considers to be 16 in length including the .gat extension
Expand Down Expand Up @@ -616,7 +618,7 @@ struct guild_castle {
int castle_id;
int mapindex;
char castle_name[NAME_LENGTH];
char castle_event[NAME_LENGTH];
char castle_event[EVENT_NAME_LENGTH];
int guild_id;
int economy;
int defense;
Expand Down
4 changes: 2 additions & 2 deletions src/map/guild.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ static bool guild_read_castledb(char* str[], int columns, int current) {// <cast
CREATE(gc, struct guild_castle, 1);
gc->castle_id = atoi(str[0]);
gc->mapindex = mapindex;
safestrncpy(gc->castle_name, str[2], sizeof(gc->castle_name));
safestrncpy(gc->castle_event, str[3], sizeof(gc->castle_event));
safestrncpy(gc->castle_name, trim(str[2]), sizeof(gc->castle_name));
safestrncpy(gc->castle_event, trim(str[3]), sizeof(gc->castle_event));

idb_put(castle_db,gc->castle_id,gc);
return true;
Expand Down
2 changes: 0 additions & 2 deletions src/map/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ enum e_mapid {
#define CHATROOM_PASS_SIZE (8 + 1)
//Max allowed chat text length
#define CHAT_SIZE_MAX (255 + 1)
// <NPC_NAME_LENGTH> for npc name + 2 for a "::" + <NAME_LENGTH> for label + 1 for EOS
#define EVENT_NAME_LENGTH ( NPC_NAME_LENGTH + 2 + NAME_LENGTH + 1 )

#define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000

Expand Down

0 comments on commit 60652e2

Please sign in to comment.