viewing paste Unknown #5693 | Diff

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
Index: src/map/itemdb.h
===================================================================
--- src/map/itemdb.h    (revision 17273)
+++ src/map/itemdb.h    (working copy)
@@ -88,7 +88,7 @@
 struct item_data {
    uint16 nameid;
    char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH];
-   
+
    //Do not add stuff between value_buy and view_id (see how getiteminfo works)
    int value_buy;
    int value_sell;
@@ -176,6 +176,7 @@
 #define itemdb_range(n) itemdb_search(n)->range
 #define itemdb_slot(n) itemdb_search(n)->slot
 #define itemdb_available(n) (itemdb_search(n)->flag.available)
+#define itemdb_traderight(n) (itemdb_search(n)->flag.trade_restriction)
 #define itemdb_viewid(n) (itemdb_search(n)->view_id)
 #define itemdb_autoequip(n) (itemdb_search(n)->flag.autoequip)
 #define itemdb_is_rune(n) (n >= ITEMID_NAUTHIZ && n <= ITEMID_HAGALAZ)
@@ -210,8 +211,8 @@
 #define itemdb_canpartnertrade(item, gmlv, gmlv2) itemdb_isrestricted(item, gmlv, gmlv2, itemdb_canpartnertrade_sub)
 #define itemdb_cansell(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_cansell_sub)
 #define itemdb_cancartstore(item, gmlv)  itemdb_isrestricted(item, gmlv, 0, itemdb_cancartstore_sub)
-#define itemdb_canstore(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_canstore_sub) 
-#define itemdb_canguildstore(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canguildstore_sub) 
+#define itemdb_canstore(item, gmlv) itemdb_isrestricted(item, gmlv, 0, itemdb_canstore_sub)
+#define itemdb_canguildstore(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canguildstore_sub)
 #define itemdb_canmail(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canmail_sub)
 #define itemdb_canauction(item, gmlv) itemdb_isrestricted(item , gmlv, 0, itemdb_canauction_sub)
 
Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 17273)
+++ src/map/skill.c (working copy)
@@ -14026,9 +14026,10 @@
    if( time < 0 )
        return 0;
 
-   if(bl->type == BL_MOB)
-       fixed = 0; //mob as no fixed time
-   else if( fixed == 0 ){
+   if( bl->type == BL_MOB )
+       return (int)time;
+
+   if( fixed == 0 ){
        fixed = (int)time * 20 / 100; // fixed time
        time = time * 80 / 100; // variable time
    }else if( fixed < 0 ) // no fixed cast time
Index: src/map/battle.c
===================================================================
--- src/map/battle.c    (revision 17273)
+++ src/map/battle.c    (working copy)
@@ -3460,7 +3460,7 @@
 
 #ifdef RENEWAL
        if( flag.cri ){
-           ATK_ADDRATE( sd->bonus.crit_atk_rate >= 100 ? sd->bonus.crit_atk_rate - 60 : 40 ); 
+           ATK_ADDRATE( sd->bonus.crit_atk_rate >= 100 ? sd->bonus.crit_atk_rate - 60 : 40 );
        }
 #endif
 
@@ -5939,6 +5939,7 @@
    { "item_restricted_consumption_type",   &battle_config.item_restricted_consumption_type,1,      0,      1,              },
    { "max_walk_path",                      &battle_config.max_walk_path,                   17,     1,      MAX_WALKPATH,   },
    { "item_enabled_npc",                   &battle_config.item_enabled_npc,                1,      0,      1,              },
+   { "item_floritem_chk",                   &battle_config.item_onfloor,                    1,      0,      1,              },
 };
 #ifndef STATS_OPT_OUT
 /**
Index: src/map/battle.h
===================================================================
--- src/map/battle.h    (revision 17273)
+++ src/map/battle.h    (working copy)
@@ -485,6 +485,7 @@
    int item_restricted_consumption_type;
    int max_walk_path;
    int item_enabled_npc;
+   int item_onfloor; //wheater or not use pop item on map if inventory full and nodrop on or not (like aegis)
    } battle_config;
 
 void do_init_battle(void);
Index: src/map/map.c
===================================================================
--- src/map/map.c   (revision 17273)
+++ src/map/map.c   (working copy)
@@ -1429,6 +1429,12 @@
 
    nullpo_ret(item_data);
 
+   if(battle_config.item_onfloor && map[m].flag.nodrop){
+       if(itemdb_traderight(item_data->nameid)&1){ //can't be dropped
+           return 0;
+       }
+   }
+
    if(!map_searchrandfreecell(m,&x,&y,flags&2?1:0))
        return 0;
    r=rnd();
Index: src/common/msg_conf.c
===================================================================
--- src/common/msg_conf.c   (revision 17273)
+++ src/common/msg_conf.c   (working copy)
@@ -12,11 +12,11 @@
  */
 const char* _msg_txt(int msg_number,int size, char ** msg_table)
 {
-    if (msg_number >= 0 && msg_number < size &&
-       msg_table[msg_number] != NULL && msg_table[msg_number][0] != '\0')
+   if (msg_number >= 0 && msg_number < size &&
+       msg_table[msg_number] != NULL && msg_table[msg_number][0] != '\0')
    return msg_table[msg_number];
 
-    return "??";
+   return "??";
 }
 
 
@@ -67,9 +67,9 @@
  * Destroy msg_table (freeup mem)
  */
 void _do_final_msg(int size, char ** msg_table){
-    int i;
-    for (i = 0; i < size; i++)
-   aFree(msg_table[i]);
+   int i;
+   for (i = 0; i < size; i++)
+       aFree(msg_table[i]);
 }
 
 /*
@@ -99,13 +99,13 @@
    switch(langtype){
        case 0: return "English (ENG)";
        case 1: return "Russkiy (RUS)"; //transliteration
-       case 2: return "Español (SPN)";
+       case 2: return "Espanol (SPN)";
        case 3: return "Deutsch (GRM)";
-       case 4: return "Hànyu (CHN)"; //transliteration
+       case 4: return "Hanyu (CHN)"; //transliteration
        case 5: return "Bahasa Malaysia (MAL)";
        case 6: return "Bahasa Indonesia (IDN)";
-       case 7: return "Français (FRN)";
-       case 8: return "Português Brasileiro (POR)";
+       case 7: return "Francais (FRN)";
+       case 8: return "Portugues Brasileiro (POR)";
        default: return "??";
    }
 }
Viewed 1342 times, submitted by lighta.