summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-17 15:43:40 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-17 15:43:40 +0000
commit94e745cce4166dea9b34b617cf66b14cfa1faab1 (patch)
treef7c86a380249e7eb197297026e211014a3a24bae /src/map/clif.c
parentd5afc60338c63c69ca26211131d98986b6b5ca82 (diff)
downloadhercules-94e745cce4166dea9b34b617cf66b14cfa1faab1.tar.gz
hercules-94e745cce4166dea9b34b617cf66b14cfa1faab1.tar.bz2
hercules-94e745cce4166dea9b34b617cf66b14cfa1faab1.tar.xz
hercules-94e745cce4166dea9b34b617cf66b14cfa1faab1.zip
- Expanded the autospell structure to hold a flag, which contains the required Battle Flag conditions required for a skill to trigger.
- Added the required constants to const.txt to specify the autospell trigger properties. - Added bonus5 bAutoSpell/bAutoSpellWhenHit. The new parameter is used to specify when the spell should trigger (melee/range + weapon/magic/misc attack), see item_bonus for details. - Applied use of packet 0x28a (clif_changeoption2) to transmit opt3 changes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10278 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 8025f7014..f66868b66 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3119,6 +3119,31 @@ int clif_changeoption(struct block_list* bl)
return 0;
}
+int clif_changeoption2(struct block_list* bl)
+{
+ unsigned char buf[20];
+ struct status_change *sc;
+
+ sc = status_get_sc(bl);
+ if (!sc) return 0; //How can an option change if there's no sc?
+
+ WBUFW(buf,0) = 0x28a;
+ WBUFL(buf,2) = bl->id;
+ WBUFL(buf,6) = sc->option;
+ WBUFL(buf,10) = clif_setlevel(status_get_lv(bl));
+ WBUFL(buf,14) = sc->opt3;
+ if(disguised(bl)) {
+ clif_send(buf,packet_len(0x28a),bl,AREA_WOS);
+ WBUFL(buf,2) = -bl->id;
+ clif_send(buf,packet_len(0x28a),bl,SELF);
+ WBUFL(buf,2) = bl->id;
+ WBUFL(buf,6) = OPTION_INVISIBLE;
+ clif_send(buf,packet_len(0x28a),bl,SELF);
+ } else
+ clif_send(buf,packet_len(0x28a),bl,AREA);
+ return 0;
+}
+
/*==========================================
*
*------------------------------------------
@@ -12012,7 +12037,7 @@ static int packetdb_readdb(void)
int skip_ver = 0;
int warned = 0;
char *str[64],*p,*str2[64],*p2,w1[64],w2[64];
- int packet_len_table[0x260] = {
+ int packet_len_table[0x290] = {
10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -12067,7 +12092,11 @@ static int packetdb_readdb(void)
12, 26, 9, 11, -1, -1, 10, 2, 282, 11, 4, 36, -1,-1, 4, 2,
//#0x0240
-1, -1, -1, -1, -1, 3, 4, 8, -1, 3, 70, 4, 8,12, 4, 10,
- 3, 32, -1, 3, 3, 5, 5, 8, 2, 3, -1, -1, 4,-1, 4, 0
+ 3, 32, -1, 3, 3, 5, 5, 8, 2, 3, -1, -1, 4,-1, 4, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ //#0x0280
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0
};
struct {
void (*func)(int, struct map_session_data *);
@@ -12212,7 +12241,7 @@ static int packetdb_readdb(void)
// Set server packet lengths - packet_db[SERVER]
memset(packet_db,0,sizeof(packet_db));
- for( i = 0; i < 0x260; ++i )
+ for( i = 0; i < sizeof(packet_len_table)/sizeof(packet_len_table[0]); ++i )
packet_len(i) = packet_len_table[i];
sprintf(line, "%s/packet_db.txt", db_path);