Skip to content

Commit

Permalink
=General
Browse files Browse the repository at this point in the history
*Updated to eAthena rev. 15268
-Fixed wrong range for 'packet_ver_flag' battle config

*Some updates on item bound system
-Added configuration option BOUND_ITEMS in core.h to disable bound system

*Added some notes here and there

*Updated some itemdb related functions to handle itemdb more efficient.
-If you'll find bugs, please report them as long as the old code is not removed. I've seen no problems with the new functions, but there are still some tests needed!
-Updated some itemdb declarations to fix some compiler warnings.
-Added the MAX_ITEMID define (by default set to unsigned short limit of 65.534).
  • Loading branch information
15peaces@googlemail.com committed Jun 22, 2014
1 parent fc33d14 commit 33859af
Show file tree
Hide file tree
Showing 21 changed files with 152 additions and 50 deletions.
3 changes: 3 additions & 0 deletions Changelog-Trunk.txt
@@ -1,4 +1,7 @@
Date Added

2014/06/20
* Fixed wrong range for 'packet_ver_flag' battle config (follow up to r15267). [Ai4rei]
2014/05/10
* Added support for 2013-12-23cRagexe. [Ai4rei]
2014/01/21
Expand Down
4 changes: 2 additions & 2 deletions conf/atcommand_athena.conf
Expand Up @@ -515,12 +515,12 @@ delitem: 60,60

//@itembound <item name/ID> <amount> <bound_type>
//Creates the specified item and bounds it to the account.
//bound_type: 1 = Account, 2 = Guild, 3 = Party
//bound_type: 1 = Account, 2 = Guild, 3 = Party, 4 = Character
itembound: 60,60

//@itembound2 <item name/ID> <quantity> <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>
//Creates an item with the given parameters (the 'cards' can be any item) and bounds it to the account.
//identify_flag: 0 = unidentified, 1 = identified, attribute: 0 = not broken, 1 = broken, bound_type: 1 = Account, 2 = Guild, 3 = Party
//identify_flag: 0 = unidentified, 1 = identified, attribute: 0 = not broken, 1 = broken, bound_type: 1 = Account, 2 = Guild, 3 = Party, 4 = Character
itembound2: 60,60

// Kill another character without hitting them.
Expand Down
4 changes: 2 additions & 2 deletions conf/battle/client.conf
Expand Up @@ -46,8 +46,8 @@
// 0x080000: 2012-07-02aRagexeRE (version 28)
// 0x100000: 2013-03-20eRagexe (version 29)
// 0x200000: 2013-07-31cRagexe (version 30)
// default value: 0xFFFFFF (all clients)
packet_ver_flag: 0xFFFFFF
// default value: 0xFFFFFFFF (all clients)
packet_ver_flag: 0xFFFFFFFF

// Minimum delay between whisper/global/party/guild messages (in ms)
// Messages that break this threshold are silently omitted.
Expand Down
4 changes: 2 additions & 2 deletions conf/msg_athena.conf
Expand Up @@ -95,7 +95,7 @@
75: War of Emperium is currently not in progress.
76: All skills have been added to your skill tree.
77: The reference result of '%s' (name: id):
78: %s: %d
78: - %s: %d
79: It is %d affair above.
80: Give the display name or monster name/id please.
81: Your GM level doesn't authorize you to preform this action on the specified player.
Expand Down Expand Up @@ -314,7 +314,7 @@
295: Please enter an item name or ID (usage: @item <item name/ID> <quantity> <bound_type>).
296: Please enter all parameters (usage: @item2 <item name/ID> <quantity>
297: <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>).
298: Invalid bound type. Valid types are - 1:Account 2:Guild 3:Party
298: Invalid bound type. Valid types are - 1:Account 2:Guild 3:Party 4:Character
// Guild Castles Number
// --------------------
//299: ?? Castles
Expand Down
5 changes: 4 additions & 1 deletion doc/script_commands.txt
Expand Up @@ -4627,6 +4627,7 @@ Bound Types:
1 - Account Bound
2 - Guild Bound
3 - Party Bound
4 - Character Bound

---------------------------------------

Expand All @@ -4647,6 +4648,7 @@ Bound Types:
1 - Account Bound
2 - Guild Bound
3 - Party Bound
4 - Character Bound

---------------------------------------

Expand All @@ -4661,7 +4663,8 @@ Using countbound without a type counts all types of bounded items.
Available types are:
1 - Account Bound
2 - Guild Bound
3 - Party Bound
3 - Party Bound
4 - Character Bound

Example:
mes "[Bound Counter]";
Expand Down
4 changes: 4 additions & 0 deletions src/char_sql/int_storage.c
Expand Up @@ -237,6 +237,7 @@ int mapif_parse_SaveGuildStorage(int fd)
return 0;
}

#ifdef BOUND_ITEMS
int mapif_itembound_ack(int fd, int aid, int guild_id)
{
WFIFOHEAD(fd,8);
Expand All @@ -246,6 +247,7 @@ int mapif_itembound_ack(int fd, int aid, int guild_id)
WFIFOSET(fd,8);
return 0;
}
#endif

//------------------------------------------------
//Guild bound items pull for offline characters [Akinari]
Expand Down Expand Up @@ -363,7 +365,9 @@ int inter_storage_parse_frommap(int fd)
switch(RFIFOW(fd,0)){
case 0x3018: mapif_parse_LoadGuildStorage(fd); break;
case 0x3019: mapif_parse_SaveGuildStorage(fd); break;
#ifdef BOUND_ITEMS
case 0x3056: mapif_parse_itembound_retrieve(fd); break;
#endif
default:
return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion src/common/core.c
Expand Up @@ -236,8 +236,9 @@ static void display_title(void)
ShowMessage(""CL_XXBL" ("CL_BOLD" ( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) "CL_XXBL")"CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_XXBL" ("CL_BOLD" \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ \\_/ "CL_XXBL")"CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_XXBL" ("CL_BOLD" "CL_XXBL")"CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_WTBL" (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_XXBL" ("CL_BT_YELLOW" Enhanced With 3rd Class Modification (15-3athena) "CL_XXBL")"CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_WTBL" (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)"CL_CLL""CL_NORMAL"\n\n");
ShowMessage(""CL_XXBL" ("CL_BOLD" Enhanced With 3rd Class Modification (15-3athena) "CL_XXBL")"CL_CLL""CL_NORMAL"\n");
ShowInfo("SVN Revision: '"CL_WHITE"%s"CL_RESET"'.\n", get_svn_revision());
}

Expand Down
4 changes: 4 additions & 0 deletions src/common/core.h
Expand Up @@ -4,6 +4,10 @@
#ifndef _CORE_H_
#define _CORE_H_

// Comment to disable Guild/Party Bound item system
// By default, we recover/remove Guild/Party Bound items automatically
#define BOUND_ITEMS

enum SERVER_STATE
{
SERVER_STATE_STOP,
Expand Down
2 changes: 1 addition & 1 deletion src/map/atcommand.c
Expand Up @@ -1717,7 +1717,7 @@ ACMD_FUNC(item)
return -1;
}

if( bound < 0 || bound > 3 ) {
if( bound < 0 || bound > 4 ) {
clif_displaymessage(fd, msg_txt(298)); // Invalid bound type
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/map/battle.c
Expand Up @@ -3893,7 +3893,7 @@ static const struct _battle_data {
{ "hack_info_GM_level", &battle_config.hack_info_GM_level, 60, 0, 100, },
{ "any_warp_GM_min_level", &battle_config.any_warp_GM_min_level, 20, 0, 100, },
{ "who_display_aid", &battle_config.who_display_aid, 40, 0, 100, },
{ "packet_ver_flag", &battle_config.packet_ver_flag, 0xFFFFFF,0x0000,INT_MAX, },
{ "packet_ver_flag", &battle_config.packet_ver_flag, INT_MAX,0, INT_MAX, },
{ "min_hair_style", &battle_config.min_hair_style, 0, 0, INT_MAX, },
{ "max_hair_style", &battle_config.max_hair_style, 23, 0, INT_MAX, },
{ "min_hair_color", &battle_config.min_hair_color, 0, 0, INT_MAX, },
Expand Down
2 changes: 2 additions & 0 deletions src/map/guild.h
Expand Up @@ -75,7 +75,9 @@ int guild_agit_end(void);
int guild_agit2_start(void);
int guild_agit2_end(void);

#ifdef BOUND_ITEMS
void guild_retrieveitembound(int char_id,int aid,int guild_id);
#endif

void do_final_guild(void);

Expand Down
6 changes: 4 additions & 2 deletions src/map/intif.c
Expand Up @@ -2005,7 +2005,7 @@ int intif_parse_mercenary_saved(int fd)
/*==========================================
* Item Bound System
*------------------------------------------*/

#ifdef BOUND_ITEMS
void intif_itembound_req(int char_id,int aid,int guild_id) {
struct guild_storage *gstor = guild2storage2(guild_id);
WFIFOHEAD(inter_fd,12);
Expand All @@ -2026,7 +2026,7 @@ void intif_parse_itembound_ack(int fd) {
gstor = guild2storage2(guild_id);
if(gstor) gstor->lock = 0; //Unlock now that operation is completed
}

#endif
//-----------------------------------------------------------------
// inter serverからの通信
// エラーがあれば0(false)を返すこと
Expand Down Expand Up @@ -2116,7 +2116,9 @@ int intif_parse(int fd)
#endif

//Bound items
#ifdef BOUND_ITEMS
case 0x3856: intif_parse_itembound_ack(fd); break;
#endif

// Mercenary System
case 0x3870: intif_parse_mercenary_received(fd); break;
Expand Down
4 changes: 3 additions & 1 deletion src/map/intif.h
Expand Up @@ -59,7 +59,9 @@ int intif_guild_notice(int guild_id, const char *mes1, const char *mes2);
int intif_guild_emblem(int guild_id, int len, const char *data);
int intif_guild_castle_dataload(int castle_id, int index);
int intif_guild_castle_datasave(int castle_id, int index, int value);
void intif_itembound_req(int char_id, int aid, int guild_id);
#ifdef BOUND_ITEMS
void intif_itembound_req(int char_id, int aid, int guild_id);
#endif

int intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, short pet_egg_id,
short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name);
Expand Down

0 comments on commit 33859af

Please sign in to comment.