summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt8
-rw-r--r--conf/msg_athena.conf7
-rw-r--r--src/map/clif.c75
-rw-r--r--src/map/pc.h1
4 files changed, 33 insertions, 58 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index e65c95a51..307423d68 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,5 +1,13 @@
Date Added
+2011/03/02
+ * Updates to the super novice's guardian angel prayer effect and related handling code. [Ai4rei]
+ - Removed the server-side chat tracking code (since r492) responsible for invoking the effect, since this functionality is handled by the client (invocation also processed by the server). This also fixes the missing 7 lines requirement on the server-side handling (bugreport:4786).
+ - Updated the checks in the client-invoked code part and documented the packet.
+ - Now only the prayer in client-side data\msgstringtable.txt (lines 791~794) applies.
+ - The prayer is no longer blocked by noskill-restrictions.
+ - Exp at 0% and 100% no longer causes the effect to trigger.
+ - Fixed the exp percent check to also check one digit after the decimal point (requirement is 10.0% not 10%).
2011/03/01
* Fixed packet 0x839 (new guild member expel notification) was expected on clients 2010-06-08aRagexeRE~2010-07-30aRagexeRE, although those do not implement it (bugreport:4789, since r14718, related r14368). [Ai4rei]
2011/02/26
diff --git a/conf/msg_athena.conf b/conf/msg_athena.conf
index a186426e3..1d88c076a 100644
--- a/conf/msg_athena.conf
+++ b/conf/msg_athena.conf
@@ -423,12 +423,7 @@
502: Day Mode is activated
503: Night Mode is activated
-//Supernovice's Guardian Angel
-//actually.. new client msgtxt file contains these 3 lines... [Lupus]
-//----------------------------
-504: Guardian Angel, can you hear my voice? ^^;
-505: My name is %s, and I'm a Super Novice~
-506: Please help me~ T.T
+// 504~506 are not used (previously super novice's guardian angel prayer)
// Trade Spoof Messages
507: This player has been banned for %d minute(s).
diff --git a/src/map/clif.c b/src/map/clif.c
index 0c7dc16b2..54e7f7737 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8861,41 +8861,6 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
map_foreachinrange(npc_chat_sub, &sd->bl, AREA_SIZE, BL_NPC, text, textlen, &sd->bl);
#endif
- // check for special supernovice phrase
- if( (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE )
- {
- unsigned int next = pc_nextbaseexp(sd);
- if( next == 0 ) next = pc_thisbaseexp(sd);
- if( get_percentage(sd->status.base_exp, next)% 10 == 0 ) // 0%, 10%, 20%, ...
- {
- switch (sd->state.snovice_call_flag) {
- case 0:
- if( strstr(message, msg_txt(504)) ) // "Guardian Angel, can you hear my voice? ^^;"
- sd->state.snovice_call_flag++;
- break;
- case 1: {
- char buf[256];
- sprintf(buf, msg_txt(505), sd->status.name);
- if( strstr(message, buf) ) // "My name is %s, and I'm a Super Novice~"
- sd->state.snovice_call_flag++;
- }
- break;
- case 2:
- if( strstr(message, msg_txt(506)) ) // "Please help me~ T.T"
- sd->state.snovice_call_flag++;
- break;
- case 3:
- if( skillnotok(MO_EXPLOSIONSPIRITS,sd) )
- break; //Do not override the noskill mapflag. [Skotlex]
- clif_skill_nodamage(&sd->bl,&sd->bl,MO_EXPLOSIONSPIRITS,-1,
- sc_start(&sd->bl,status_skill2sc(MO_EXPLOSIONSPIRITS),100,
- 17,skill_get_time(MO_EXPLOSIONSPIRITS,1))); //Lv17-> +50 critical (noted by Poki) [Skotlex]
- sd->state.snovice_call_flag = 0;
- break;
- }
- }
- }
-
// Chat logging type 'O' / Global Chat
if( log_config.chat&1 || (log_config.chat&2 && !((agit_flag || agit2_flag) && log_config.chat&64)) )
log_chat("O", 0, sd->status.char_id, sd->status.account_id, mapindex_id2name(sd->mapindex), sd->bl.x, sd->bl.y, NULL, message);
@@ -11835,28 +11800,36 @@ void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd)
}
return;
}
-/*==========================================
- * ƒXƒpƒmƒr‚Ì”š—ô”g“®
- *------------------------------------------*/
+
+
+/// Request to invoke the effect of super novice's guardian angel prayer (CZ_CHOPOKGI)
+/// 01ed
+/// Note: This packet is caused by 7 lines of any text, followed by
+/// the prayer and an another line of any text. The prayer is
+/// defined by lines 791~794 in data\msgstringtable.txt
+/// "Dear angel, can you hear my voice?"
+/// "I am" (space separated player name) "Super Novice~"
+/// "Help me out~ Please~ T_T"
void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
{
- if(sd){
- int nextbaseexp=pc_nextbaseexp(sd);
- if (battle_config.etc_log){
- if(nextbaseexp != 0)
- ShowInfo("SuperNovice explosionspirits!! %d %d %d %d\n",sd->bl.id,sd->status.class_,sd->status.base_exp,(int)((double)1000*sd->status.base_exp/nextbaseexp));
- else
- ShowInfo("SuperNovice explosionspirits!! %d %d %d 000\n",sd->bl.id,sd->status.class_,sd->status.base_exp);
- }
- if((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.base_exp > 0 && nextbaseexp > 0 && (int)((double)1000*sd->status.base_exp/nextbaseexp)%100==0){
- clif_skill_nodamage(&sd->bl,&sd->bl,MO_EXPLOSIONSPIRITS,5,
- sc_start(&sd->bl,status_skill2sc(MO_EXPLOSIONSPIRITS),100,
- 5,skill_get_time(MO_EXPLOSIONSPIRITS,5)));
+ if( ( sd->class_&MAPID_UPPERMASK ) == MAPID_SUPER_NOVICE )
+ {
+ unsigned int next = pc_nextbaseexp(sd);
+
+ if( next )
+ {
+ int percent = (int)( ( (float)sd->status.base_exp/(float)next )*1000. );
+
+ if( percent && ( percent%100 ) == 0 )
+ {// 10.0%, 20.0%, ..., 90.0%
+ sc_start(&sd->bl, status_skill2sc(MO_EXPLOSIONSPIRITS), 100, 17, skill_get_time(MO_EXPLOSIONSPIRITS, 5)); //Lv17-> +50 critical (noted by Poki) [Skotlex]
+ clif_skill_nodamage(&sd->bl, &sd->bl, MO_EXPLOSIONSPIRITS, 5, 1); // prayer always shows successful Lv5 cast and disregards noskill restrictions
+ }
}
}
- return;
}
+
/*==========================================
* Friends List
*------------------------------------------*/
diff --git a/src/map/pc.h b/src/map/pc.h
index 328e43047..4b176b659 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -105,7 +105,6 @@ struct map_session_data {
unsigned gangsterparadise : 1;
unsigned rest : 1;
unsigned storage_flag : 2; //0: closed, 1: Normal Storage open, 2: guild storage open [Skotlex]
- unsigned snovice_call_flag : 2; //Summon Angel (stage 1~3)
unsigned snovice_dead_flag : 1; //Explosion spirits on death: 0 off, 1 used.
unsigned abra_flag : 1; // Abracadabra bugfix by Aru
unsigned autocast : 1; // Autospell flag [Inkfish]