From 18de636c1fba5cf1abd201a1973b983d67b907ff Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Fri, 18 Dec 2015 21:15:44 +0100 Subject: [PATCH] Fixed #772. This is not a real fix but rather a fix which issues a warning for this kind of problem to show clearly that it is working as "intended". --- db/mob_avail.txt | 1 + src/map/mob.c | 7 +++++++ src/map/status.h | 13 +++++-------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/db/mob_avail.txt b/db/mob_avail.txt index 86354b59f9..65b779c973 100644 --- a/db/mob_avail.txt +++ b/db/mob_avail.txt @@ -13,6 +13,7 @@ // // SpriteID is a job class value. // Weapon and Shield uses Item ID, while Head uses View ID. +// Option for carts only works if you compiled your server for a packet version before 2012-02-01 //1002,1039 // Poring - Baphomet //1970,1002,10013 // Displays a Poring with a backpack diff --git a/src/map/mob.c b/src/map/mob.c index 7011cfadca..d5598574c1 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4100,6 +4100,13 @@ static bool mob_readdb_mobavail(char* str[], int columns, int current) mob_db_data[mob_id]->vd.head_bottom=atoi(str[9]); mob_db_data[mob_id]->option=atoi(str[10])&~(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE); mob_db_data[mob_id]->vd.cloth_color=atoi(str[11]); // Monster player dye option - Valaris + +#ifdef NEW_CARTS + if( mob_db_data[mob_id]->option & OPTION_CART ){ + ShowWarning("mob_readdb_mobavail: You tried to use a cart for mob id %d. This does not work with setting an option anymore.\n", mob_id ); + mob_db_data[mob_id]->option &= ~OPTION_CART; + } +#endif } else if(columns==3) mob_db_data[mob_id]->vd.head_bottom=atoi(str[2]); // mob equipment [Valaris] diff --git a/src/map/status.h b/src/map/status.h index f7bf9dbf8a..e6035a456e 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1759,9 +1759,14 @@ enum e_option { OPTION_SIGHT = 0x00000001, OPTION_HIDE = 0x00000002, OPTION_CLOAK = 0x00000004, + OPTION_CART1 = 0x00000008, OPTION_FALCON = 0x00000010, OPTION_RIDING = 0x00000020, OPTION_INVISIBLE = 0x00000040, + OPTION_CART2 = 0x00000080, + OPTION_CART3 = 0x00000100, + OPTION_CART4 = 0x00000200, + OPTION_CART5 = 0x00000400, OPTION_ORCISH = 0x00000800, OPTION_WEDDING = 0x00001000, OPTION_RUWACH = 0x00002000, @@ -1781,16 +1786,8 @@ enum e_option { OPTION_HANBOK = 0x08000000, OPTION_OKTOBERFEST = 0x10000000, -#ifndef NEW_CARTS - OPTION_CART1 = 0x00000008, - OPTION_CART2 = 0x00000080, - OPTION_CART3 = 0x00000100, - OPTION_CART4 = 0x00000200, - OPTION_CART5 = 0x00000400, - // compound constant for older carts OPTION_CART = OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5, -#endif // compound constants OPTION_DRAGON = OPTION_DRAGON1|OPTION_DRAGON2|OPTION_DRAGON3|OPTION_DRAGON4|OPTION_DRAGON5,