Procházet zdrojové kódy

- Changed @pettalk /dice to roll random 1-6 (before it always rolled 1).
- Added more /emotions to pet emotion processing.
- Removed the clif_skill_fail so it doesn't spam them with a message
(the client limits spamming clif_parse_Emotion, but not spamming @commands).
- Follow up to r15009: used clif_emotion constants (see r14518).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15916 54d463be-8e91-2dee-dedb-b68131a5f0ec

brianluau před 13 roky
rodič
revize
ff15797bc5
4 změnil soubory, kde provedl 26 přidání a 23 odebrání
  1. 9 9
      db/const.txt
  2. 7 4
      src/map/atcommand.c
  3. 7 7
      src/map/clif.h
  4. 3 3
      src/map/status.c

+ 9 - 9
db/const.txt

@@ -1258,27 +1258,27 @@ e_malaysia	49
 e_singapore	50
 e_brazil	51
 e_flash	52
-e_turn	53
+e_spin	53
 e_sigh	54
-e_proud	55
+e_dum	55
 e_loud	56
-e_ohnoes	57
-e_dice	58
+e_otl	57
+e_dice1	58
 e_dice2	59
 e_dice3	60
 e_dice4	61
 e_dice5	62
 e_dice6	63
 e_india	64
-e_looser	65
+e_luv	65
 e_russia	66
 e_virgin	67
-e_phone	68
+e_mobile	68
 e_mail	69
 e_chinese	70
-e_signal	71
-e_signal2	72
-e_signal3	73
+e_antenna1	71
+e_antenna2	72
+e_antenna3	73
 e_hum	74
 e_abs	75
 e_oops	76

+ 7 - 4
src/map/atcommand.c

@@ -6242,17 +6242,20 @@ ACMD_FUNC(pettalk)
 			"/!", "/?", "/ho", "/lv", "/swt", "/ic", "/an", "/ag", "/$", "/...",
 			"/scissors", "/rock", "/paper", "/korea", "/lv2", "/thx", "/wah", "/sry", "/heh", "/swt2",
 			"/hmm", "/no1", "/??", "/omg", "/O", "/X", "/hlp", "/go", "/sob", "/gg",
-			"/kis", "/kis2", "/pif", "/ok", "-?-", "-?-", "/bzz", "/rice", "/awsm", "/meh",
-			"/shy", "/pat", "/mp", "/slur", "/com", "/yawn", "/grat", "/hp", "/philippines", "/usa",
-			"/indonesia", "/brazil", "/fsh", "/spin", "/sigh", "/dum", "/crwd", "/desp", "/dice"
+			"/kis", "/kis2", "/pif", "/ok", "-?-", "/indonesia", "/bzz", "/rice", "/awsm", "/meh",
+			"/shy", "/pat", "/mp", "/slur", "/com", "/yawn", "/grat", "/hp", "/philippines", "/malaysia",
+			"/singapore", "/brazil", "/fsh", "/spin", "/sigh", "/dum", "/crwd", "/desp", "/dice", "-dice2",
+			"-dice3", "-dice4", "-dice5", "-dice6", "/india", "/love", "/russia", "-?-", "/mobile", "/mail",
+			"/chinese", "/antenna1", "/antenna2", "/antenna3", "/hum", "/abs", "/oops", "/spit", "/ene", "/panic",
+			"/whisp"
 		};
 		int i;
 		ARR_FIND( 0, ARRAYLENGTH(emo), i, stricmp(message, emo[i]) == 0 );
+		if( i == E_DICE1 ) i = rand()%6 + E_DICE1; // randomize /dice
 		if( i < ARRAYLENGTH(emo) )
 		{
 			if (sd->emotionlasttime + 1 >= time(NULL)) { // not more than 1 per second
 					sd->emotionlasttime = time(NULL);
-					clif_skill_fail(sd, 1, 0, 1);
 					return 0;
 			}
 			sd->emotionlasttime = time(NULL);

+ 7 - 7
src/map/clif.h

@@ -140,9 +140,9 @@ typedef enum emotion_type
 	E_FLASH,        // /fsh
 	E_SPIN,         // /spin
 	E_SIGH,
-	E_PROUD,        // /dum
+	E_DUM,          // /dum
 	E_LOUD,         // /crwd
-	E_OHNOES,       // /desp, /otl
+	E_OTL,          // /otl, /desp
 	E_DICE1,
 	E_DICE2,
 	E_DICE3,        // --- 60
@@ -150,15 +150,15 @@ typedef enum emotion_type
 	E_DICE5,
 	E_DICE6,
 	E_INDIA,
-	E_LOOSER,
+	E_LUV,          // /love
 	E_RUSSIA,
 	E_VIRGIN,
-	E_PHONE,
+	E_MOBILE,
 	E_MAIL,
 	E_CHINESE,      // --- 70
-	E_SIGNAL,
-	E_SIGNAL2,
-	E_SIGNAL3,
+	E_ANTENNA1,
+	E_ANTENNA2,
+	E_ANTENNA3,
 	E_HUM,
 	E_ABS,
 	E_OOPS,

+ 3 - 3
src/map/status.c

@@ -9313,7 +9313,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
 					}
 				}
 
-				clif_emotion(bl,18);
+				clif_emotion(bl,E_HEH);
 				sc_timer_next(4000+tick,status_change_timer,bl->id,data);
 			}
 			return 0;
@@ -9337,7 +9337,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
 	case SC_OBLIVIONCURSE:
 		if( --(sce->val4) >= 0 )
 		{
-			clif_emotion(bl,1);
+			clif_emotion(bl,E_WHAT);
 			sc_timer_next(3000 + tick, status_change_timer, bl->id, data );
 			return 0;
 		}
@@ -9488,7 +9488,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
 	case SC_VOICEOFSIREN:
 		if( --(sce->val4) >= 0 )
 		{
-			clif_emotion(bl,3);
+			clif_emotion(bl,E_LV);
 			sc_timer_next(2000 + tick, status_change_timer, bl->id, data);
 			return 0;
 		}