summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/char.cpp63
-rw-r--r--src/char/int_storage.cpp15
-rw-r--r--src/common/extract.cpp18
-rw-r--r--src/common/mmo.hpp10
-rw-r--r--src/map/atcommand.cpp218
-rw-r--r--src/map/battle.cpp17
-rw-r--r--src/map/battle.hpp1
-rw-r--r--src/map/chrif.cpp3
-rw-r--r--src/map/clif.cpp187
-rw-r--r--src/map/itemdb.cpp3
-rw-r--r--src/map/itemdb.hpp2
-rw-r--r--src/map/magic-expr.cpp1
-rw-r--r--src/map/map.cpp8
-rw-r--r--src/map/map.hpp3
-rw-r--r--src/map/mob.cpp1
-rw-r--r--src/map/npc.cpp1
-rw-r--r--src/map/pc.cpp123
-rw-r--r--src/map/script.cpp22
-rw-r--r--src/map/skill.cpp4
-rw-r--r--src/map/skill.t.hpp3
20 files changed, 105 insertions, 598 deletions
diff --git a/src/char/char.cpp b/src/char/char.cpp
index 81afeed..f6fd492 100644
--- a/src/char/char.cpp
+++ b/src/char/char.cpp
@@ -276,12 +276,7 @@ AString mmo_char_tostr(struct CharPair *cp)
p->last_point.map_, p->last_point.x, p->last_point.y,
p->save_point.map_, p->save_point.x, p->save_point.y, p->partner_id);
- for (int i = 0; i < 10; i++)
- if (p->memo_point[i].map_)
- {
- str_p += STRPRINTF("%s,%d,%d ",
- p->memo_point[i].map_, p->memo_point[i].x, p->memo_point[i].y);
- }
+ // memos were here (no longer supported)
str_p += '\t';
for (int i = 0; i < MAX_INVENTORY; i++)
@@ -292,34 +287,18 @@ AString mmo_char_tostr(struct CharPair *cp)
p->inventory[i].nameid,
p->inventory[i].amount,
p->inventory[i].equip,
- p->inventory[i].identify,
- p->inventory[i].refine,
- p->inventory[i].attribute,
- p->inventory[i].card[0],
- p->inventory[i].card[1],
- p->inventory[i].card[2],
- p->inventory[i].card[3],
- p->inventory[i].broken);
+ 1 /*identify*/,
+ 0 /*refine*/,
+ 0 /*attribute*/,
+ 0 /*card[0]*/,
+ 0 /*card[1]*/,
+ 0 /*card[2]*/,
+ 0 /*card[3]*/,
+ 0 /*broken*/);
}
str_p += '\t';
- for (int i = 0; i < MAX_CART; i++)
- if (p->cart[i].nameid)
- {
- str_p += STRPRINTF("%d,%d,%d,%hhu,%d,%hd,%hhu,%d,%d,%d,%d,%d ",
- p->cart[i].id,
- p->cart[i].nameid,
- p->cart[i].amount,
- p->cart[i].equip,
- p->cart[i].identify,
- p->cart[i].refine,
- p->cart[i].attribute,
- p->cart[i].card[0],
- p->cart[i].card[1],
- p->cart[i].card[2],
- p->cart[i].card[3],
- p->cart[i].broken);
- }
+ // cart was here (no longer supported)
str_p += '\t';
for (SkillID i : erange(SkillID(), MAX_SKILL))
@@ -376,8 +355,9 @@ bool extract(XString str, CharPair *cp)
CharData *p = cp->data.get();
uint32_t unused_guild_id, unused_pet_id;
- std::vector<struct point> memos;
- std::vector<struct item> inventory, cart;
+ XString unused_memos;
+ std::vector<struct item> inventory;
+ XString unused_cart;
std::vector<struct skill_loader> skills;
std::vector<struct global_reg> vars;
if (!extract(str,
@@ -399,9 +379,9 @@ bool extract(XString str, CharPair *cp)
// of this, instead of adding a new \t
// or putting it elsewhere, like by pet/guild
record<','>(&p->save_point.map_, &p->save_point.x, &p->save_point.y, &p->partner_id),
- vrec<' '>(&memos),
+ &unused_memos,
vrec<' '>(&inventory),
- vrec<' '>(&cart),
+ &unused_cart,
vrec<' '>(&skills),
vrec<' '>(&vars))))
return false;
@@ -424,20 +404,14 @@ bool extract(XString str, CharPair *cp)
return false;
}
- if (memos.size() > 10)
- return false;
- std::copy(memos.begin(), memos.end(), p->memo_point);
- // number of memo points is not saved - it just detects map name '\0'
+ // memos were here - no longer supported
if (inventory.size() > MAX_INVENTORY)
return false;
std::copy(inventory.begin(), inventory.end(), p->inventory);
// number of inventory items is not saved - it just detects nameid 0
- if (cart.size() > MAX_CART)
- return false;
- std::copy(cart.begin(), cart.end(), p->cart);
- // number of cart items is not saved - it just detects nameid 0
+ // cart was here - no longer supported
for (struct skill_loader& sk : skills)
{
@@ -1378,8 +1352,7 @@ void parse_tologin(Session *ls)
#define FIX(v) if (v == source_id) {v = dest_id; ++changes; }
for (j = 0; j < MAX_INVENTORY; j++)
FIX(c->inventory[j].nameid);
- for (j = 0; j < MAX_CART; j++)
- FIX(c->cart[j].nameid);
+ // used to FIX cart, but it's no longer supported
// FIX(c->weapon);
FIX(c->shield);
FIX(c->head_top);
diff --git a/src/char/int_storage.cpp b/src/char/int_storage.cpp
index cdc6e05..91151ec 100644
--- a/src/char/int_storage.cpp
+++ b/src/char/int_storage.cpp
@@ -46,13 +46,14 @@ AString storage_tostr(struct storage *p)
p->storage_[i].nameid,
p->storage_[i].amount,
p->storage_[i].equip,
- p->storage_[i].identify,
- p->storage_[i].refine,
- p->storage_[i].attribute,
- p->storage_[i].card[0],
- p->storage_[i].card[1],
- p->storage_[i].card[2],
- p->storage_[i].card[3]);
+ 0 /*identify*/,
+ 0 /*refine*/,
+ 0 /*attribute*/,
+ 0 /*card[0]*/,
+ 0 /*card[1]*/,
+ 0 /*card[2]*/,
+ 0 /*card[3]*/);
+ // shouldn't that include 'broken' also? Oh, well ...
f++;
}
diff --git a/src/common/extract.cpp b/src/common/extract.cpp
index 5c07e24..378986d 100644
--- a/src/common/extract.cpp
+++ b/src/common/extract.cpp
@@ -44,19 +44,19 @@ bool extract(XString str, struct global_reg *var)
bool extract(XString str, struct item *it)
{
- it->broken = 0;
+ XString ignored;
return extract(str,
record<',', 11>(
&it->id,
&it->nameid,
&it->amount,
&it->equip,
- &it->identify,
- &it->refine,
- &it->attribute,
- &it->card[0],
- &it->card[1],
- &it->card[2],
- &it->card[3],
- &it->broken));
+ &ignored,
+ &ignored,
+ &ignored,
+ &ignored,
+ &ignored,
+ &ignored,
+ &ignored,
+ &ignored));
}
diff --git a/src/common/mmo.hpp b/src/common/mmo.hpp
index 67123d9..bb30682 100644
--- a/src/common/mmo.hpp
+++ b/src/common/mmo.hpp
@@ -18,7 +18,6 @@ constexpr int MAX_MAP_PER_SERVER = 512;
constexpr int MAX_INVENTORY = 100;
constexpr int MAX_AMOUNT = 30000;
constexpr int MAX_ZENY = 1000000000; // 1G zeny
-constexpr int MAX_CART = 100;
enum class SkillID : uint16_t;
constexpr SkillID MAX_SKILL = SkillID(474); // not 450
@@ -173,11 +172,6 @@ struct item
short nameid;
short amount;
EPOS equip;
- uint8_t identify;
- uint8_t refine;
- uint8_t attribute;
- short card[4];
- short broken;
};
struct point
@@ -327,8 +321,8 @@ struct CharData
unsigned long mapip;
unsigned int mapport;
- struct point last_point, save_point, memo_point[10];
- struct item inventory[MAX_INVENTORY], cart[MAX_CART];
+ struct point last_point, save_point;
+ struct item inventory[MAX_INVENTORY];
earray<skill_value, SkillID, MAX_SKILL> skill;
int global_reg_num;
struct global_reg global_reg[GLOBAL_REG_NUM];
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
index 5e46775..39e81a9 100644
--- a/src/map/atcommand.cpp
+++ b/src/map/atcommand.cpp
@@ -1322,7 +1322,6 @@ ATCE atcommand_item(Session *s, dumb_ptr<map_session_data> sd,
{
struct item item_tmp {};
item_tmp.nameid = item_id;
- item_tmp.identify = 1;
PickupFail flag;
if ((flag = pc_additem(sd, &item_tmp, get_count))
!= PickupFail::OKAY)
@@ -3114,12 +3113,8 @@ ATCE atcommand_char_wipe(Session *s, dumb_ptr<map_session_data> sd,
// Give knife and shirt
struct item item;
item.nameid = 1201;
- // knife
- item.identify = 1;
- item.broken = 0;
pc_additem(pl_sd, &item, 1);
item.nameid = 1202;
- // shirt
pc_additem(pl_sd, &item, 1);
// Reset stats and skills
@@ -3809,8 +3804,8 @@ static
ATCE atcommand_character_item_list(Session *s, dumb_ptr<map_session_data> sd,
ZString message)
{
- struct item_data *item_data = NULL, *item_temp;
- int i, j, count, counter, counter2;
+ struct item_data *item_data = NULL;
+ int i, count, counter;
CharName character;
if (!asplit(message, &character))
@@ -3880,16 +3875,7 @@ ATCE atcommand_character_item_list(Session *s, dumb_ptr<map_session_data> sd,
equipstr = MString();
AString output;
- if (sd->status.inventory[i].refine)
- output = STRPRINTF("%d %s %+d (%s %+d, id: %d) %s",
- pl_sd->status.inventory[i].amount,
- item_data->name,
- pl_sd->status.inventory[i].refine,
- item_data->jname,
- pl_sd->status.inventory[i].refine,
- pl_sd->status.inventory[i].nameid,
- AString(equipstr));
- else
+ if (true)
output = STRPRINTF("%d %s (%s, id: %d) %s",
pl_sd->status.inventory[i].amount,
item_data->name, item_data->jname,
@@ -3897,40 +3883,7 @@ ATCE atcommand_character_item_list(Session *s, dumb_ptr<map_session_data> sd,
AString(equipstr));
clif_displaymessage(s, output);
- MString voutput;
- counter2 = 0;
- for (j = 0; j < item_data->slot; j++)
- {
- if (pl_sd->status.inventory[i].card[j])
- {
- if ((item_temp =
- itemdb_search(pl_sd->status.
- inventory[i].card[j])) !=
- NULL)
- {
- if (!voutput)
- voutput += STRPRINTF(
- " -> (card(s): "
- "#%d %s (%s), ",
- ++counter2,
- item_temp->name,
- item_temp->jname);
- else
- voutput += STRPRINTF(
- "#%d %s (%s), ",
- ++counter2,
- item_temp->name,
- item_temp->jname);
- }
- }
- }
- if (voutput)
- {
- // replace trailing ", "
- voutput.pop_back();
- voutput.back() = ')';
- clif_displaymessage(s, AString(voutput));
- }
+ // snip cards
}
}
if (count == 0)
@@ -3963,8 +3916,8 @@ ATCE atcommand_character_storage_list(Session *s, dumb_ptr<map_session_data> sd,
ZString message)
{
struct storage *stor;
- struct item_data *item_data = NULL, *item_temp;
- int i, j, count, counter, counter2;
+ struct item_data *item_data = NULL;
+ int i, count, counter;
CharName character;
if (!asplit(message, &character))
@@ -3996,55 +3949,12 @@ ATCE atcommand_character_storage_list(Session *s, dumb_ptr<map_session_data> sd,
clif_displaymessage(s, output);
}
AString output;
- if (stor->storage_[i].refine)
- output = STRPRINTF("%d %s %+d (%s %+d, id: %d)",
- stor->storage_[i].amount,
- item_data->name,
- stor->storage_[i].refine,
- item_data->jname,
- stor->storage_[i].refine,
- stor->storage_[i].nameid);
- else
+ if (true)
output = STRPRINTF("%d %s (%s, id: %d)",
stor->storage_[i].amount,
item_data->name, item_data->jname,
stor->storage_[i].nameid);
clif_displaymessage(s, output);
-
- MString voutput;
- counter2 = 0;
- for (j = 0; j < item_data->slot; j++)
- {
- if (stor->storage_[i].card[j])
- {
- if ((item_temp =
- itemdb_search(stor->
- storage_[i].card[j])) !=
- NULL)
- {
- if (!voutput)
- voutput += STRPRINTF(
- " -> (card(s): "
- "#%d %s (%s), ",
- ++counter2,
- item_temp->name,
- item_temp->jname);
- else
- voutput += STRPRINTF(
- "#%d %s (%s), ",
- ++counter2,
- item_temp->name,
- item_temp->jname);
- }
- }
- }
- if (voutput)
- {
- // replace last ", "
- voutput.pop_back();
- voutput.back() = ')';
- clif_displaymessage(s, AString(voutput));
- }
}
}
if (count == 0)
@@ -4080,117 +3990,6 @@ ATCE atcommand_character_storage_list(Session *s, dumb_ptr<map_session_data> sd,
}
static
-ATCE atcommand_character_cart_list(Session *s, dumb_ptr<map_session_data> sd,
- ZString message)
-{
- struct item_data *item_data = NULL, *item_temp;
- int i, j, count, counter, counter2;
- CharName character;
-
- if (!asplit(message, &character))
- return ATCE::USAGE;
-
- dumb_ptr<map_session_data> pl_sd = map_nick2sd(character);
- if (pl_sd != NULL)
- {
- if (pc_isGM(sd) >= pc_isGM(pl_sd))
- {
- // you can look items only lower or same level
- counter = 0;
- count = 0;
- for (i = 0; i < MAX_CART; i++)
- {
- if (pl_sd->status.cart[i].nameid > 0
- && (item_data =
- itemdb_search(pl_sd->status.cart[i].nameid)) != NULL)
- {
- counter = counter + pl_sd->status.cart[i].amount;
- count++;
- if (count == 1)
- {
- AString output = STRPRINTF(
- "------ Cart items list of '%s' ------",
- pl_sd->status_key.name);
- clif_displaymessage(s, output);
- }
-
- AString output;
- if (pl_sd->status.cart[i].refine)
- output = STRPRINTF("%d %s %+d (%s %+d, id: %d)",
- pl_sd->status.cart[i].amount,
- item_data->name,
- pl_sd->status.cart[i].refine,
- item_data->jname,
- pl_sd->status.cart[i].refine,
- pl_sd->status.cart[i].nameid);
- else
-
- output = STRPRINTF("%d %s (%s, id: %d)",
- pl_sd->status.cart[i].amount,
- item_data->name, item_data->jname,
- pl_sd->status.cart[i].nameid);
- clif_displaymessage(s, output);
-
- MString voutput;
- counter2 = 0;
- for (j = 0; j < item_data->slot; j++)
- {
- if (pl_sd->status.cart[i].card[j])
- {
- if ((item_temp =
- itemdb_search(pl_sd->status.
- cart[i].card[j])) != NULL)
- {
- if (!voutput)
- voutput += STRPRINTF(
- " -> (card(s): "
- "#%d %s (%s), ",
- ++counter2,
- item_temp->name,
- item_temp->jname);
- else
- voutput += STRPRINTF(
- "#%d %s (%s), ",
- ++counter2,
- item_temp->name,
- item_temp->jname);
- }
- }
- }
- if (voutput)
- {
- voutput.pop_back();
- voutput.back() = '0';
- clif_displaymessage(s, AString(voutput));
- }
- }
- }
- if (count == 0)
- clif_displaymessage(s,
- "No item found in the cart of this player.");
- else
- {
- AString output = STRPRINTF("%d item(s) found in %d kind(s) of items.",
- counter, count);
- clif_displaymessage(s, output);
- }
- }
- else
- {
- clif_displaymessage(s, "Your GM level don't authorise you to do this action on this player.");
- return ATCE::PERM;
- }
- }
- else
- {
- clif_displaymessage(s, "Character not found.");
- return ATCE::EXIST;
- }
-
- return ATCE::OKAY;
-}
-
-static
ATCE atcommand_killer(Session *s, dumb_ptr<map_session_data> sd,
ZString)
{
@@ -5379,9 +5178,6 @@ Map<XString, AtCommandInfo> atcommand_info =
{"charstoragelist", {"<charname>",
99, atcommand_character_storage_list,
"List a player's storage"}},
- {"charcartlist", {"<charname>",
- 99, atcommand_character_cart_list,
- "List a player's cart"}},
{"addwarp", {"<mapname> <x> <y>",
80, atcommand_addwarp,
"Create a new permanent warp"}},
diff --git a/src/map/battle.cpp b/src/map/battle.cpp
index 4d76dbd..59e798d 100644
--- a/src/map/battle.cpp
+++ b/src/map/battle.cpp
@@ -1452,12 +1452,6 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src,
if (sd->double_rate > 0 && skill_num == SkillID::ZERO && skill_lv >= 0)
da = random_::chance({sd->double_rate, 100});
- // 過剰精錬ボーナス
- if (sd->overrefine > 0)
- damage += random_::in(1, sd->overrefine);
- if (sd->overrefine_ > 0)
- damage2 += random_::in(1, sd->overrefine_);
-
if (!da)
{ //ダブルアタックが発動していない
// クリティカル計算
@@ -1644,10 +1638,6 @@ struct Damage battle_calc_pc_weapon_attack(dumb_ptr<block_list> src,
if (damage2 < 0)
damage2 = 0;
- // 星のかけら、気球の適用
- damage += sd->star;
- damage2 += sd->star_;
-
// >二刀流の左右ダメージ計算誰かやってくれぇぇぇぇえええ!
// >map_session_data に左手ダメージ(atk,atk2)追加して
// >pc_calcstatus()でやるべきかな?
@@ -2349,7 +2339,6 @@ Battle_Config init_battle_config()
battle_config.max_sp = 32500;
battle_config.max_lv = 99; // [MouseJstr]
battle_config.max_parameter = 99;
- battle_config.max_cart_weight = 8000;
battle_config.monster_skill_log = 0;
battle_config.battle_log = 0;
battle_config.save_log = 0;
@@ -2476,7 +2465,6 @@ bool battle_config_read(ZString cfgName)
BATTLE_CONFIG_VAR(max_sp),
BATTLE_CONFIG_VAR(max_lv),
BATTLE_CONFIG_VAR(max_parameter),
- BATTLE_CONFIG_VAR(max_cart_weight),
BATTLE_CONFIG_VAR(monster_skill_log),
BATTLE_CONFIG_VAR(battle_log),
BATTLE_CONFIG_VAR(save_log),
@@ -2611,11 +2599,6 @@ void battle_config_check()
battle_config.max_parameter = 10;
if (battle_config.max_parameter > 10000)
battle_config.max_parameter = 10000;
- if (battle_config.max_cart_weight > 1000000)
- battle_config.max_cart_weight = 1000000;
- if (battle_config.max_cart_weight < 100)
- battle_config.max_cart_weight = 100;
- battle_config.max_cart_weight *= 10;
if (battle_config.agi_penaly_count < 2)
battle_config.agi_penaly_count = 2;
diff --git a/src/map/battle.hpp b/src/map/battle.hpp
index 32c479e..243d7fb 100644
--- a/src/map/battle.hpp
+++ b/src/map/battle.hpp
@@ -133,7 +133,6 @@ extern struct Battle_Config
int max_sp;
int max_lv;
int max_parameter;
- int max_cart_weight;
int monster_skill_log;
int battle_log;
int save_log;
diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp
index a74e870..48cff81 100644
--- a/src/map/chrif.cpp
+++ b/src/map/chrif.cpp
@@ -945,8 +945,7 @@ void ladmin_itemfrob_c2(dumb_ptr<block_list> bl, int source_id, int dest_id)
for (j = 0; j < MAX_INVENTORY; j++)
IFIX(pc->status.inventory[j].nameid);
- for (j = 0; j < MAX_CART; j++)
- IFIX(pc->status.cart[j].nameid);
+ // cart is no longer supported
// IFIX(pc->status.weapon);
IFIX(pc->status.shield);
IFIX(pc->status.head_top);
diff --git a/src/map/clif.cpp b/src/map/clif.cpp
index 70e9e1d..37646bf 100644
--- a/src/map/clif.cpp
+++ b/src/map/clif.cpp
@@ -528,7 +528,7 @@ int clif_set009e(dumb_ptr<flooritem_data> fitem, uint8_t *buf)
WBUFW(buf, 0) = 0x9e;
WBUFL(buf, 2) = fitem->bl_id;
WBUFW(buf, 6) = fitem->item_data.nameid;
- WBUFB(buf, 8) = fitem->item_data.identify;
+ WBUFB(buf, 8) = 1; //identify;
WBUFW(buf, 9) = fitem->bl_x;
WBUFW(buf, 11) = fitem->bl_y;
WBUFB(buf, 13) = fitem->subx;
@@ -1369,27 +1369,14 @@ int clif_additem(dumb_ptr<map_session_data> sd, int n, int amount, PickupFail fa
WFIFOW(s, 2) = n + 2;
WFIFOW(s, 4) = amount;
WFIFOW(s, 6) = sd->status.inventory[n].nameid;
- WFIFOB(s, 8) = sd->status.inventory[n].identify;
- if (sd->status.inventory[n].broken == 1)
- WFIFOB(s, 9) = 1; // is weapon broken [Valaris]
- else
- WFIFOB(s, 9) = sd->status.inventory[n].attribute;
- WFIFOB(s, 10) = sd->status.inventory[n].refine;
- if (sd->status.inventory[n].card[0] == 0x00ff
- || sd->status.inventory[n].card[0] == 0x00fe
- || sd->status.inventory[n].card[0] == static_cast<short>(0xff00))
- {
- WFIFOW(s, 11) = sd->status.inventory[n].card[0];
- WFIFOW(s, 13) = sd->status.inventory[n].card[1];
- WFIFOW(s, 15) = sd->status.inventory[n].card[2];
- WFIFOW(s, 17) = sd->status.inventory[n].card[3];
- }
- else
+ WFIFOB(s, 8) = 1; //identify;
+ WFIFOB(s, 9) = 0; // broken or attribute;
+ WFIFOB(s, 10) = 0; //refine;
{
- WFIFOW(s, 11) = sd->status.inventory[n].card[0];
- WFIFOW(s, 13) = sd->status.inventory[n].card[1];
- WFIFOW(s, 15) = sd->status.inventory[n].card[2];
- WFIFOW(s, 17) = sd->status.inventory[n].card[3];
+ WFIFOW(s, 11) = 0; //card[0];
+ WFIFOW(s, 13) = 0; //card[1];
+ WFIFOW(s, 15) = 0; //card[2];
+ WFIFOW(s, 17) = 0; //card[3];
}
WFIFOW(s, 19) = uint16_t(pc_equippoint(sd, n));
WFIFOB(s, 21) = uint8_t(sd->inventory_data[n]->type == ItemType::_7
@@ -1439,7 +1426,7 @@ void clif_itemlist(dumb_ptr<map_session_data> sd)
WFIFOW(s, n * 18 + 4) = i + 2;
WFIFOW(s, n * 18 + 6) = sd->status.inventory[i].nameid;
WFIFOB(s, n * 18 + 8) = uint8_t(sd->inventory_data[i]->type);
- WFIFOB(s, n * 18 + 9) = sd->status.inventory[i].identify;
+ WFIFOB(s, n * 18 + 9) = 1; //identify;
WFIFOW(s, n * 18 + 10) = sd->status.inventory[i].amount;
if (sd->inventory_data[i]->equip == EPOS::ARROW)
{
@@ -1449,10 +1436,10 @@ void clif_itemlist(dumb_ptr<map_session_data> sd)
}
else
WFIFOW(s, n * 18 + 12) = uint16_t(EPOS::ZERO);
- WFIFOW(s, n * 18 + 14) = sd->status.inventory[i].card[0];
- WFIFOW(s, n * 18 + 16) = sd->status.inventory[i].card[1];
- WFIFOW(s, n * 18 + 18) = sd->status.inventory[i].card[2];
- WFIFOW(s, n * 18 + 20) = sd->status.inventory[i].card[3];
+ WFIFOW(s, n * 18 + 14) = 0; //card[0];
+ WFIFOW(s, n * 18 + 16) = 0; //card[1];
+ WFIFOW(s, n * 18 + 18) = 0; //card[2];
+ WFIFOW(s, n * 18 + 20) = 0; //card[3];
n++;
}
if (n)
@@ -1487,29 +1474,16 @@ void clif_equiplist(dumb_ptr<map_session_data> sd)
sd->inventory_data[i]->type == ItemType::_7
? ItemType::WEAPON
: sd->inventory_data[i]->type);
- WFIFOB(s, n * 20 + 9) = sd->status.inventory[i].identify;
+ WFIFOB(s, n * 20 + 9) = 0; //identify;
WFIFOW(s, n * 20 + 10) = uint16_t(pc_equippoint(sd, i));
WFIFOW(s, n * 20 + 12) = uint16_t(sd->status.inventory[i].equip);
- if (sd->status.inventory[i].broken == 1)
- WFIFOB(s, n * 20 + 14) = 1; // is weapon broken [Valaris]
- else
- WFIFOB(s, n * 20 + 14) = sd->status.inventory[i].attribute;
- WFIFOB(s, n * 20 + 15) = sd->status.inventory[i].refine;
- if (sd->status.inventory[i].card[0] == 0x00ff
- || sd->status.inventory[i].card[0] == 0x00fe
- || sd->status.inventory[i].card[0] == static_cast<short>(0xff00))
+ WFIFOB(s, n * 20 + 14) = 0; //broken or attribute;
+ WFIFOB(s, n * 20 + 15) = 0; //refine;
{
- WFIFOW(s, n * 20 + 16) = sd->status.inventory[i].card[0];
- WFIFOW(s, n * 20 + 18) = sd->status.inventory[i].card[1];
- WFIFOW(s, n * 20 + 20) = sd->status.inventory[i].card[2];
- WFIFOW(s, n * 20 + 22) = sd->status.inventory[i].card[3];
- }
- else
- {
- WFIFOW(s, n * 20 + 16) = sd->status.inventory[i].card[0];
- WFIFOW(s, n * 20 + 18) = sd->status.inventory[i].card[1];
- WFIFOW(s, n * 20 + 20) = sd->status.inventory[i].card[2];
- WFIFOW(s, n * 20 + 22) = sd->status.inventory[i].card[3];
+ WFIFOW(s, n * 20 + 16) = 0; //card[0];
+ WFIFOW(s, n * 20 + 18) = 0; //card[1];
+ WFIFOW(s, n * 20 + 20) = 0; //card[2];
+ WFIFOW(s, n * 20 + 22) = 0; //card[3];
}
n++;
}
@@ -1546,13 +1520,13 @@ int clif_storageitemlist(dumb_ptr<map_session_data> sd, struct storage *stor)
WFIFOW(s, n * 18 + 4) = i + 1;
WFIFOW(s, n * 18 + 6) = stor->storage_[i].nameid;
WFIFOB(s, n * 18 + 8) = uint8_t(id->type);
- WFIFOB(s, n * 18 + 9) = stor->storage_[i].identify;
+ WFIFOB(s, n * 18 + 9) = 0; //identify;
WFIFOW(s, n * 18 + 10) = stor->storage_[i].amount;
WFIFOW(s, n * 18 + 12) = 0;
- WFIFOW(s, n * 18 + 14) = stor->storage_[i].card[0];
- WFIFOW(s, n * 18 + 16) = stor->storage_[i].card[1];
- WFIFOW(s, n * 18 + 18) = stor->storage_[i].card[2];
- WFIFOW(s, n * 18 + 20) = stor->storage_[i].card[3];
+ WFIFOW(s, n * 18 + 14) = 0; //card[0];
+ WFIFOW(s, n * 18 + 16) = 0; //card[1];
+ WFIFOW(s, n * 18 + 18) = 0; //card[2];
+ WFIFOW(s, n * 18 + 20) = 0; //card[3];
n++;
}
if (n)
@@ -1588,29 +1562,16 @@ int clif_storageequiplist(dumb_ptr<map_session_data> sd, struct storage *stor)
WFIFOW(s, n * 20 + 4) = i + 1;
WFIFOW(s, n * 20 + 6) = stor->storage_[i].nameid;
WFIFOB(s, n * 20 + 8) = uint8_t(id->type);
- WFIFOB(s, n * 20 + 9) = stor->storage_[i].identify;
+ WFIFOB(s, n * 20 + 9) = 0; //identify;
WFIFOW(s, n * 20 + 10) = uint16_t(id->equip);
WFIFOW(s, n * 20 + 12) = uint16_t(stor->storage_[i].equip);
- if (stor->storage_[i].broken == 1)
- WFIFOB(s, n * 20 + 14) = 1; //is weapon broken [Valaris]
- else
- WFIFOB(s, n * 20 + 14) = stor->storage_[i].attribute;
- WFIFOB(s, n * 20 + 15) = stor->storage_[i].refine;
- if (stor->storage_[i].card[0] == 0x00ff
- || stor->storage_[i].card[0] == 0x00fe
- || stor->storage_[i].card[0] == static_cast<short>(0xff00))
- {
- WFIFOW(s, n * 20 + 16) = stor->storage_[i].card[0];
- WFIFOW(s, n * 20 + 18) = stor->storage_[i].card[1];
- WFIFOW(s, n * 20 + 20) = stor->storage_[i].card[2];
- WFIFOW(s, n * 20 + 22) = stor->storage_[i].card[3];
- }
- else
+ WFIFOB(s, n * 20 + 14) = 0; //broken or attribute
+ WFIFOB(s, n * 20 + 15) = 0; //refine;
{
- WFIFOW(s, n * 20 + 16) = stor->storage_[i].card[0];
- WFIFOW(s, n * 20 + 18) = stor->storage_[i].card[1];
- WFIFOW(s, n * 20 + 20) = stor->storage_[i].card[2];
- WFIFOW(s, n * 20 + 22) = stor->storage_[i].card[3];
+ WFIFOW(s, n * 20 + 16) = 0; //card[0];
+ WFIFOW(s, n * 20 + 18) = 0; //card[1];
+ WFIFOW(s, n * 20 + 20) = 0; //card[2];
+ WFIFOW(s, n * 20 + 22) = 0; //card[3];
}
n++;
}
@@ -2164,27 +2125,14 @@ void clif_tradeadditem(dumb_ptr<map_session_data> sd,
{
index -= 2;
WFIFOW(s, 6) = sd->status.inventory[index].nameid; // type id
- WFIFOB(s, 8) = sd->status.inventory[index].identify; //identify flag
- if (sd->status.inventory[index].broken == 1)
- WFIFOB(s, 9) = 1; // is broke weapon [Valaris]
- else
- WFIFOB(s, 9) = sd->status.inventory[index].attribute; // attribute
- WFIFOB(s, 10) = sd->status.inventory[index].refine; //refine
- if (sd->status.inventory[index].card[0] == 0x00ff
- || sd->status.inventory[index].card[0] == 0x00fe
- || sd->status.inventory[index].card[0] == static_cast<short>(0xff00))
+ WFIFOB(s, 8) = 0; //identify;
+ WFIFOB(s, 9) = 0; //broken or attribute;
+ WFIFOB(s, 10) = 0; //refine;
{
- WFIFOW(s, 11) = sd->status.inventory[index].card[0]; //card (4w)
- WFIFOW(s, 13) = sd->status.inventory[index].card[1]; //card (4w)
- WFIFOW(s, 15) = sd->status.inventory[index].card[2]; //card (4w)
- WFIFOW(s, 17) = sd->status.inventory[index].card[3]; //card (4w)
- }
- else
- {
- WFIFOW(s, 11) = sd->status.inventory[index].card[0];
- WFIFOW(s, 13) = sd->status.inventory[index].card[1];
- WFIFOW(s, 15) = sd->status.inventory[index].card[2];
- WFIFOW(s, 17) = sd->status.inventory[index].card[3];
+ WFIFOW(s, 11) = 0; //card[0];
+ WFIFOW(s, 13) = 0; //card[1];
+ WFIFOW(s, 15) = 0; //card[2];
+ WFIFOW(s, 17) = 0; //card[3];
}
}
WFIFOSET(s, clif_parse_func_table[0xe9].len);
@@ -2293,27 +2241,14 @@ int clif_storageitemadded(dumb_ptr<map_session_data> sd, struct storage *stor,
WFIFOW(fd,8) =view;
else*/
WFIFOW(s, 8) = stor->storage_[index].nameid;
- WFIFOB(s, 10) = stor->storage_[index].identify; //identify flag
- if (stor->storage_[index].broken == 1)
- WFIFOB(s, 11) = 1; // is weapon broken [Valaris]
- else
- WFIFOB(s, 11) = stor->storage_[index].attribute; // attribute
- WFIFOB(s, 12) = stor->storage_[index].refine; //refine
- if (stor->storage_[index].card[0] == 0x00ff
- || stor->storage_[index].card[0] == 0x00fe
- || stor->storage_[index].card[0] == static_cast<short>(0xff00))
- {
- WFIFOW(s, 13) = stor->storage_[index].card[0]; //card (4w)
- WFIFOW(s, 15) = stor->storage_[index].card[1]; //card (4w)
- WFIFOW(s, 17) = stor->storage_[index].card[2]; //card (4w)
- WFIFOW(s, 19) = stor->storage_[index].card[3]; //card (4w)
- }
- else
+ WFIFOB(s, 10) = 0; //identify;
+ WFIFOB(s, 11) = 0; //broken or attribute;
+ WFIFOB(s, 12) = 0; //refine;
{
- WFIFOW(s, 13) = stor->storage_[index].card[0];
- WFIFOW(s, 15) = stor->storage_[index].card[1];
- WFIFOW(s, 17) = stor->storage_[index].card[2];
- WFIFOW(s, 19) = stor->storage_[index].card[3];
+ WFIFOW(s, 13) = 0; //card[0];
+ WFIFOW(s, 15) = 0; //card[1];
+ WFIFOW(s, 17) = 0; //card[2];
+ WFIFOW(s, 19) = 0; //card[3];
}
WFIFOSET(s, clif_parse_func_table[0xf4].len);
@@ -2556,7 +2491,7 @@ void clif_getareachar_item(dumb_ptr<map_session_data> sd,
WFIFOW(s, 0) = 0x9d;
WFIFOL(s, 2) = fitem->bl_id;
WFIFOW(s, 6) = fitem->item_data.nameid;
- WFIFOB(s, 8) = fitem->item_data.identify;
+ WFIFOB(s, 8) = 0; //identify;
WFIFOW(s, 9) = fitem->bl_x;
WFIFOW(s, 11) = fitem->bl_y;
WFIFOW(s, 13) = fitem->item_data.amount;
@@ -3465,8 +3400,6 @@ void clif_parse_WantToConnection(Session *s, dumb_ptr<map_session_data> sd)
static
void clif_parse_LoadEndAck(Session *, dumb_ptr<map_session_data> sd)
{
-// struct item_data* item;
- int i;
nullpo_retv(sd);
if (sd->bl_prev != NULL)
@@ -3540,17 +3473,7 @@ void clif_parse_LoadEndAck(Session *, dumb_ptr<map_session_data> sd)
// option
clif_changeoption(sd);
- for (i = 0; i < MAX_INVENTORY; i++)
- {
- if (bool(sd->status.inventory[i].equip)
- && bool(sd->status.inventory[i].equip & EPOS::WEAPON)
- && sd->status.inventory[i].broken == 1)
- skill_status_change_start(sd, StatusChange::SC_BROKNWEAPON, 0, interval_t::zero());
- if (bool(sd->status.inventory[i].equip)
- && bool(sd->status.inventory[i].equip & EPOS::MISC1)
- && sd->status.inventory[i].broken == 1)
- skill_status_change_start(sd, StatusChange::SC_BROKNARMOR, 0, interval_t::zero());
- }
+ // broken equipment
// clif_changelook_accessories(sd, NULL);
@@ -4184,20 +4107,10 @@ void clif_parse_EquipItem(Session *s, dumb_ptr<map_session_data> sd)
if (sd->npc_id != 0)
return;
- if (sd->status.inventory[index].identify != 1)
- { // 未鑑定
- // Bjorn: Auto-identify items when equipping them as there
- // is no nice way to do this in the client yet.
- sd->status.inventory[index].identify = 1;
- //clif_equipitemack(sd,index,0,0); // fail
- //return;
- }
- //ペット用装備であるかないか
if (sd->inventory_data[index])
{
EPOS epos = EPOS(RFIFOW(s, 4));
if (sd->inventory_data[index]->type == ItemType::ARROW)
- // 矢を無理やり装備できるように(−−;
epos = EPOS::ARROW;
// Note: the EPOS argument to pc_equipitem is actually ignored
@@ -4222,10 +4135,6 @@ void clif_parse_UnequipItem(Session *s, dumb_ptr<map_session_data> sd)
return;
}
index = RFIFOW(s, 2) - 2;
- if (sd->status.inventory[index].broken == 1 && sd->sc_data[StatusChange::SC_BROKNWEAPON].timer)
- skill_status_change_end(sd, StatusChange::SC_BROKNWEAPON, nullptr);
- if (sd->status.inventory[index].broken == 1 && sd->sc_data[StatusChange::SC_BROKNARMOR].timer)
- skill_status_change_end(sd, StatusChange::SC_BROKNARMOR, nullptr);
if (sd->npc_id != 0
|| sd->opt1 != Opt1::ZERO)
diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp
index ba225bd..330bd8b 100644
--- a/src/map/itemdb.cpp
+++ b/src/map/itemdb.cpp
@@ -176,6 +176,7 @@ bool itemdb_readdb(ZString filename)
// According to the code, tail_part may be empty. See later.
ZString tail_part = line.xislice_t(it);
+ XString unused_slot_count;
item_data idv {};
if (!extract(
main_part, record<','>(
@@ -190,7 +191,7 @@ bool itemdb_readdb(ZString filename)
lstripping(&idv.def),
lstripping(&idv.range),
lstripping(&idv.magic_bonus),
- lstripping(&idv.slot),
+ lstripping(&unused_slot_count),
lstripping(&idv.sex),
lstripping(&idv.equip),
lstripping(&idv.wlv),
diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp
index 2ec8f1c..f026f95 100644
--- a/src/map/itemdb.hpp
+++ b/src/map/itemdb.hpp
@@ -20,11 +20,9 @@ struct item_data
int def;
int range;
int magic_bonus;
- int slot;
ItemLook look;
int elv;
int wlv;
- int refine;
std::unique_ptr<const ScriptBuffer> use_script;
std::unique_ptr<const ScriptBuffer> equip_script;
};
diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp
index 65cd35b..1f9ef82 100644
--- a/src/map/magic-expr.cpp
+++ b/src/map/magic-expr.cpp
@@ -770,7 +770,6 @@ magic_find_item(const_array<val_t> args, int index, struct item *item_, int *sta
*item_ = item();
item_->nameid = item_data->nameid;
- item_->identify = 1;
return 0;
}
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 4fa511a..132afac 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -1629,13 +1629,7 @@ void term_func(void)
int compare_item(struct item *a, struct item *b)
{
- return ((a->nameid == b->nameid) &&
- (a->identify == b->identify) &&
- (a->refine == b->refine) &&
- (a->attribute == b->attribute) &&
- (a->card[0] == b->card[0]) &&
- (a->card[1] == b->card[1]) &&
- (a->card[2] == b->card[2]) && (a->card[3] == b->card[3]));
+ return (a->nameid == b->nameid);
}
static
diff --git a/src/map/map.hpp b/src/map/map.hpp
index ad5adcf..1964a3c 100644
--- a/src/map/map.hpp
+++ b/src/map/map.hpp
@@ -175,7 +175,6 @@ struct map_session_data : block_list, SessionData
struct item_data *inventory_data[MAX_INVENTORY];
earray<short, EQUIP, EQUIP::COUNT> equip_index;
int weight, max_weight;
- int cart_weight, cart_max_weight, cart_num, cart_max_num;
MapName mapname_;
Session *sess; // use this, you idiots!
short to_x, to_y;
@@ -244,10 +243,8 @@ struct map_session_data : block_list, SessionData
interval_t aspd, amotion, dmotion;
int watk, watk2;
int def, def2, mdef, mdef2, critical, matk1, matk2;
- int star, overrefine;
int hprate, sprate, dsprate;
int watk_, watk_2;
- int star_, overrefine_; //二刀流のために追加
int base_atk, atk_rate;
int arrow_atk;
int arrow_cri, arrow_hit, arrow_range;
diff --git a/src/map/mob.cpp b/src/map/mob.cpp
index c67dbc4..5a414be 100644
--- a/src/map/mob.cpp
+++ b/src/map/mob.cpp
@@ -2170,7 +2170,6 @@ void mob_delay_item_drop(TimerData *, tick_t, struct delay_item_drop ditem)
temp_item.nameid = ditem.nameid;
temp_item.amount = ditem.amount;
- temp_item.identify = !itemdb_isequip3(temp_item.nameid);
if (battle_config.item_auto_get == 1)
{
diff --git a/src/map/npc.cpp b/src/map/npc.cpp
index 43926e0..8ecd7a3 100644
--- a/src/map/npc.cpp
+++ b/src/map/npc.cpp
@@ -819,7 +819,6 @@ int npc_buylist(dumb_ptr<map_session_data> sd, int n,
struct item item_tmp {};
item_tmp.nameid = item_data->nameid;
- item_tmp.identify = 1; // npc販売アイテムは鑑定済み
if (amount > 1
&& (item_data->type == ItemType::WEAPON
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 8ff5a01..86280ed 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -932,19 +932,7 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first)
sd->inventory_data[i]->weight *
sd->status.inventory[i].amount;
}
- sd->cart_max_weight = battle_config.max_cart_weight;
- sd->cart_weight = 0;
- sd->cart_max_num = MAX_CART;
- sd->cart_num = 0;
- for (int i = 0; i < MAX_CART; i++)
- {
- if (sd->status.cart[i].nameid == 0)
- continue;
- sd->cart_weight +=
- itemdb_weight(sd->status.cart[i].nameid) *
- sd->status.cart[i].amount;
- sd->cart_num++;
- }
+ // used to fill cart
}
for (auto& p : sd->paramb)
@@ -967,8 +955,6 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first)
sd->status.max_sp = 0;
sd->attackrange = 0;
sd->attackrange_ = 0;
- sd->star = 0;
- sd->overrefine = 0;
sd->matk1 = 0;
sd->matk2 = 0;
sd->speed = DEFAULT_WALK_SPEED;
@@ -985,8 +971,6 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first)
sd->watk_ = 0; //二刀流用(仮)
sd->watk_2 = 0;
- sd->star_ = 0;
- sd->overrefine_ = 0;
sd->aspd_rate = 100;
sd->speed_rate = 100;
@@ -1027,55 +1011,7 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first)
sd->spellpower_bonus_target +=
sd->inventory_data[index]->magic_bonus;
- if (sd->inventory_data[index]->type == ItemType::WEAPON)
- {
- if (sd->status.inventory[index].card[0] != 0x00ff
- && sd->status.inventory[index].card[0] != 0x00fe
- && sd->status.inventory[index].card[0] != static_cast<short>(0xff00))
- {
- int j;
- for (j = 0; j < sd->inventory_data[index]->slot; j++)
- { // カード
- int c = sd->status.inventory[index].card[j];
- if (c > 0)
- {
- argrec_t arg[2] =
- {
- {"@slotId", static_cast<int>(i)},
- {"@itemId", sd->inventory_data[index]->nameid},
- };
- if (i == EQUIP::SHIELD
- && sd->status.inventory[index].equip == EPOS::SHIELD)
- sd->state.lr_flag = 1;
- run_script_l(ScriptPointer(itemdb_equipscript(c), 0), sd->bl_id, 0,
- 2, arg);
- sd->state.lr_flag = 0;
- }
- }
- }
- }
- else if (sd->inventory_data[index]->type == ItemType::ARMOR)
- { // 防具
- if (sd->status.inventory[index].card[0] != 0x00ff
- && sd->status.inventory[index].card[0] != 0x00fe
- && sd->status.inventory[index].card[0] != static_cast<short>(0xff00))
- {
- int j;
- for (j = 0; j < sd->inventory_data[index]->slot; j++)
- { // カード
- int c = sd->status.inventory[index].card[j];
- if (c > 0) {
- argrec_t arg[2] =
- {
- {"@slotId", static_cast<int>(i)},
- {"@itemId", sd->inventory_data[index]->nameid}
- };
- run_script_l(ScriptPointer(itemdb_equipscript(c), 0), sd->bl_id, 0,
- 2, arg);
- }
- }
- }
- }
+ // used to apply cards
}
}
@@ -1110,21 +1046,13 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first)
sd->def += sd->inventory_data[index]->def;
if (sd->inventory_data[index]->type == ItemType::WEAPON)
{
- int r;
if (i == EQUIP::SHIELD
&& sd->status.inventory[index].equip == EPOS::SHIELD)
{
//二刀流用データ入力
sd->watk_ += sd->inventory_data[index]->atk;
- sd->watk_2 = (r = sd->status.inventory[index].refine) * // 精錬攻撃力
- 0;
- if ((r -= 10) > 0) // 過剰精錬ボーナス
- sd->overrefine_ = r * 0;
-
- if (sd->status.inventory[index].card[0] == 0x00ff)
- { // 製造武器
- sd->star_ = (sd->status.inventory[index].card[1] >> 8); // 星のかけら
- }
+ sd->watk_2 = 0;
+
sd->attackrange_ += sd->inventory_data[index]->range;
sd->state.lr_flag = 1;
{
@@ -1148,15 +1076,7 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first)
{"@itemId", sd->inventory_data[index]->nameid},
};
sd->watk += sd->inventory_data[index]->atk;
- sd->watk2 += (r = sd->status.inventory[index].refine) * // 精錬攻撃力
- 0;
- if ((r -= 10) > 0) // 過剰精錬ボーナス
- sd->overrefine += r * 0;
-
- if (sd->status.inventory[index].card[0] == 0x00ff)
- { // 製造武器
- sd->star += (sd->status.inventory[index].card[1] >> 8); // 星のかけら
- }
+
sd->attackrange += sd->inventory_data[index]->range;
run_script_l(ScriptPointer(sd->inventory_data[index]->equip_script.get(), 0),
sd->bl_id, 0,
@@ -1171,8 +1091,6 @@ int pc_calcstatus(dumb_ptr<map_session_data> sd, int first)
{"@itemId", sd->inventory_data[index]->nameid},
};
sd->watk += sd->inventory_data[index]->atk;
- refinedef +=
- sd->status.inventory[index].refine * 0;
run_script_l(ScriptPointer(sd->inventory_data[index]->equip_script.get(), 0),
sd->bl_id, 0,
2, arg);
@@ -2027,11 +1945,7 @@ PickupFail pc_additem(dumb_ptr<map_session_data> sd, struct item *item_data,
{
// 装 備品ではないので、既所有品なら個数のみ変化させる
for (i = 0; i < MAX_INVENTORY; i++)
- if (sd->status.inventory[i].nameid == item_data->nameid &&
- sd->status.inventory[i].card[0] == item_data->card[0]
- && sd->status.inventory[i].card[1] == item_data->card[1]
- && sd->status.inventory[i].card[2] == item_data->card[2]
- && sd->status.inventory[i].card[3] == item_data->card[3])
+ if (sd->status.inventory[i].nameid == item_data->nameid)
{
if (sd->status.inventory[i].amount + amount > MAX_AMOUNT)
return PickupFail::STACK_FULL;
@@ -4454,8 +4368,8 @@ int pc_equipitem(dumb_ptr<map_session_data> sd, int n, EPOS)
if (battle_config.battle_log)
PRINTF("equip %d (%d) %x:%x\n",
nameid, n, id->equip, pos);
- if (!pc_isequip(sd, n) || pos == EPOS::ZERO || sd->status.inventory[n].broken == 1)
- { // [Valaris]
+ if (!pc_isequip(sd, n) || pos == EPOS::ZERO)
+ {
clif_equipitemack(sd, n, EPOS::ZERO, 0); // fail
return 0;
}
@@ -4623,11 +4537,6 @@ int pc_unequipitem(dumb_ptr<map_session_data> sd, int n, CalcStatus type)
}
pc_signal_advanced_equipment_change(sd, n);
- if (sd->sc_data[StatusChange::SC_BROKNWEAPON].timer
- && bool(sd->status.inventory[n].equip & EPOS::WEAPON)
- && sd->status.inventory[n].broken == 1)
- skill_status_change_end(sd, StatusChange::SC_BROKNWEAPON, nullptr);
-
clif_unequipitemack(sd, n, sd->status.inventory[n].equip, 1);
sd->status.inventory[n].equip = EPOS::ZERO;
}
@@ -4690,22 +4599,6 @@ int pc_checkitem(dumb_ptr<map_session_data> sd)
for (k = j; k < MAX_INVENTORY; k++)
sd->inventory_data[k] = NULL;
- // カート内空き詰め
- for (i = j = 0; i < MAX_CART; i++)
- {
- if ((id = sd->status.cart[i].nameid) == 0)
- continue;
- if (i > j)
- {
- sd->status.cart[j] = sd->status.cart[i];
- }
- j++;
- }
- while (j < MAX_CART)
- sd->status.cart[j++] = item{};
-
- // 装 備位置チェック
-
for (i = 0; i < MAX_INVENTORY; i++)
{
if (sd->status.inventory[i].nameid == 0)
diff --git a/src/map/script.cpp b/src/map/script.cpp
index 6fe965c..e3db7c7 100644
--- a/src/map/script.cpp
+++ b/src/map/script.cpp
@@ -1932,7 +1932,6 @@ void builtin_getitem(ScriptState *st)
{
struct item item_tmp {};
item_tmp.nameid = nameid;
- item_tmp.identify = 1;
if (HARGO2(5)) //アイテムを指定したIDに渡す
sd = map_id2sd(conv_num(st, &AARGO2(5)));
if (sd == NULL) //アイテムを渡す相手がいなかったらお帰り
@@ -1956,7 +1955,7 @@ void builtin_getitem(ScriptState *st)
static
void builtin_makeitem(ScriptState *st)
{
- int nameid, amount, flag = 0;
+ int nameid, amount;
int x, y;
dumb_ptr<map_session_data> sd;
struct script_data *data;
@@ -1991,14 +1990,9 @@ void builtin_makeitem(ScriptState *st)
{
struct item item_tmp {};
item_tmp.nameid = nameid;
- if (!flag)
- item_tmp.identify = 1;
- else
- item_tmp.identify = !itemdb_isequip3(nameid);
map_addflooritem(&item_tmp, amount, m, x, y, NULL, NULL, NULL);
}
-
}
/*==========================================
@@ -3439,20 +3433,6 @@ void builtin_getinventorylist(ScriptState *st)
sd->status.inventory[i].amount);
pc_setreg(sd, SIR::from(variable_names.intern("@inventorylist_equip"), j),
static_cast<uint16_t>(sd->status.inventory[i].equip));
- pc_setreg(sd, SIR::from(variable_names.intern("@inventorylist_refine"), j),
- sd->status.inventory[i].refine);
- pc_setreg(sd, SIR::from(variable_names.intern("@inventorylist_identify"), j),
- sd->status.inventory[i].identify);
- pc_setreg(sd, SIR::from(variable_names.intern("@inventorylist_attribute"), j),
- sd->status.inventory[i].attribute);
- pc_setreg(sd, SIR::from(variable_names.intern("@inventorylist_card1"), j),
- sd->status.inventory[i].card[0]);
- pc_setreg(sd, SIR::from(variable_names.intern("@inventorylist_card2"), j),
- sd->status.inventory[i].card[1]);
- pc_setreg(sd, SIR::from(variable_names.intern("@inventorylist_card3"), j),
- sd->status.inventory[i].card[2]);
- pc_setreg(sd, SIR::from(variable_names.intern("@inventorylist_card4"), j),
- sd->status.inventory[i].card[3]);
j++;
}
}
diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index 0222202..077bf66 100644
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -873,8 +873,6 @@ void skill_status_change_timer(TimerData *tid, tick_t tick, int id, StatusChange
/* 時間切れ無し?? */
case StatusChange::SC_WEIGHT50:
case StatusChange::SC_WEIGHT90:
- case StatusChange::SC_BROKNWEAPON:
- case StatusChange::SC_BROKNARMOR:
sc_data[type].timer = Timer(tick + std::chrono::minutes(10),
std::bind(skill_status_change_timer, ph::_1, ph::_2,
bl->bl_id, type));
@@ -1006,8 +1004,6 @@ int skill_status_effect(dumb_ptr<block_list> bl, StatusChange type,
case StatusChange::SC_WEIGHT50:
case StatusChange::SC_WEIGHT90:
- case StatusChange::SC_BROKNWEAPON:
- case StatusChange::SC_BROKNARMOR:
tick = std::chrono::minutes(10);
break;
diff --git a/src/map/skill.t.hpp b/src/map/skill.t.hpp
index bfa0e2f..1470d61 100644
--- a/src/map/skill.t.hpp
+++ b/src/map/skill.t.hpp
@@ -26,9 +26,6 @@ enum class StatusChange : uint16_t
// the rest are the normal effects
SC_SLOWPOISON = 14, // item script
- SC_BROKNARMOR = 32, // ?
- SC_BROKNWEAPON = 33, // ?
-
SC_WEIGHT50 = 35, // ? sort of used
SC_WEIGHT90 = 36, // definitely used
SC_SPEEDPOTION0 = 37, // item script