summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-22 10:26:39 +0000
committermc_cameri <mc_cameri@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-22 10:26:39 +0000
commit0113082fd5a64bb8787f52b293f0018b557b8452 (patch)
tree0ed3c8c117767a0e1f7ac0c493bf848e8e710549
parent1741d214fc89dbe02a704474740d92cd7e8618a2 (diff)
downloadhercules-0113082fd5a64bb8787f52b293f0018b557b8452.tar.gz
hercules-0113082fd5a64bb8787f52b293f0018b557b8452.tar.bz2
hercules-0113082fd5a64bb8787f52b293f0018b557b8452.tar.xz
hercules-0113082fd5a64bb8787f52b293f0018b557b8452.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@311 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt4
-rw-r--r--conf-tmpl/charcommand_athena.conf13
-rw-r--r--src/map/atcommand.c6
-rw-r--r--src/map/charcommand.c45
-rw-r--r--src/map/clif.c11
5 files changed, 58 insertions, 21 deletions
diff --git a/Changelog.txt b/Changelog.txt
index c832f1375..0e0b68cb1 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,6 +1,8 @@
Date Added
11/22
* Added the old effect list # into effect_list.txt of spira's. [shadow]
+ * Added new flag (#3) to clif_specialeffect [MC Cameri]
+ * @doom,@die,@doommap now display the Dark Cross effect on you. [MC Cameri]
11/21
* Display IP when wdata is expanded [Wizputer]
* Added bClassChange,%; Has random chance to turn monster into another monster. [Valaris]
@@ -13,7 +15,7 @@ Date Added
- Fixed a typo with Blade Stop that was causing crashes, sorry. ^^;
- Reverted changes to Cloaking, ours is already more updated! ^_^
- Added temporary code for guild skills to stop crashing
- * @alive, @raisemap, @raise now display the resurrection skill animation [MC Cameri]
+ * @alive, @raisemap, @raise, @revive now display the resurrection skill animation [MC Cameri]
* @charpetrename(AtCommand) is now #petrename(CharCommand) [MC Cameri]
* @charjob/(AtCommand) is now #jobchange(CharCommand) [MC Cameri]
* Removed japanese interserver packets, should fix various problems (jumpto, where, charposreq). [Valaris]
diff --git a/conf-tmpl/charcommand_athena.conf b/conf-tmpl/charcommand_athena.conf
new file mode 100644
index 000000000..729215dc5
--- /dev/null
+++ b/conf-tmpl/charcommand_athena.conf
@@ -0,0 +1,13 @@
+// Athena charcommand Configuration file.
+// Translated by Peter Kieser <pfak@telus.net>
+
+// Set here the symbol that you want to use for your commands
+// Only 1 character is get (default is '#'). You can set any character,
+// except control-character (0x00-0x1f), '%' (party chat speaking) and '/' (standard ragnarok GM commands)
+// With default character, all commands begin by a '#': <example> #revive
+command_symbol: #
+
+job: 60
+jobchange: 60
+petrename: 50
+petfriendly: 50
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 286f5837f..b8368db1d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1974,6 +1974,7 @@ int atcommand_die(
const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
+ clif_specialeffect(&sd->bl,450,1);
pc_damage(NULL, sd, sd->status.hp + 1);
clif_displaymessage(fd, msg_table[13]); // A pity! You've died.
@@ -4571,7 +4572,7 @@ int atcommand_doom(
{
struct map_session_data *pl_sd;
int i;
-
+ clif_specialeffect(&sd->bl,450,2);
for(i = 0; i < fd_max; i++) {
if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && i != fd &&
pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can doom only lower or same gm level
@@ -4594,11 +4595,12 @@ int atcommand_doommap(
{
struct map_session_data *pl_sd;
int i;
-
+ clif_specialeffect(&sd->bl,450,3);
for (i = 0; i < fd_max; i++) {
if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && i != fd && sd->bl.m == pl_sd->bl.m &&
pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can doom only lower or same gm level
pc_damage(NULL, pl_sd, pl_sd->status.hp + 1);
+// clif_specialeffect(&pl_sd->bl,450,1);
clif_displaymessage(pl_sd->fd, msg_table[61]); // The holy messenger has given judgement.
}
}
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index b510cf9f9..6a8b0cbeb 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -391,41 +391,50 @@ int charcommand_petfriendly(
{
int friendly = 0;
int t = 0;
+ char character[100];
+ struct map_session_data *pl_sd;
- if (!message || !*message || (friendly = atoi(message)) < 0) {
+ memset(character, '\0', sizeof(character));
+ if (!message || !*message || sscanf(message,"%d %s",&friendly,character) < 2) {
clif_displaymessage(fd, "Please, enter a valid value (usage: "
"#petfriendly <0-1000> <player>).");
return 0;
}
- if (sd->status.pet_id > 0 && sd->pd) {
- if (friendly >= 0 && friendly <= 1000) {
- if (friendly != sd->pet.intimate) {
- t = sd->pet.intimate;
- sd->pet.intimate = friendly;
- clif_send_petstatus(sd);
- if (battle_config.pet_status_support) {
- if ((sd->pet.intimate > 0 && t <= 0) ||
- (sd->pet.intimate <= 0 && t > 0)) {
- if (sd->bl.prev != NULL)
- pc_calcstatus(sd, 0);
- else
- pc_calcstatus(sd, 2);
+ if (((pl_sd = map_nick2sd(character)) != NULL) && pc_isGM(sd)>pc_isGM(pl_sd)) {
+ if (pl_sd->status.pet_id > 0 && pl_sd->pd) {
+ if (friendly >= 0 && friendly <= 1000) {
+ if (friendly != pl_sd->pet.intimate) {
+ t = pl_sd->pet.intimate;
+ pl_sd->pet.intimate = friendly;
+ clif_send_petstatus(pl_sd);
+ if (battle_config.pet_status_support) {
+ if ((pl_sd->pet.intimate > 0 && t <= 0) ||
+ (pl_sd->pet.intimate <= 0 && t > 0)) {
+ if (pl_sd->bl.prev != NULL)
+ pc_calcstatus(pl_sd, 0);
+ else
+ pc_calcstatus(pl_sd, 2);
+ }
}
+ clif_displaymessage(pl_sd->fd, msg_table[182]); // Pet friendly value changed!
+ clif_displaymessage(sd->fd, msg_table[182]); // Pet friendly value changed!
+ } else {
+ clif_displaymessage(fd, msg_table[183]); // Pet friendly is already the good value.
+ return -1;
}
- clif_displaymessage(fd, msg_table[182]); // Pet friendly value changed!
} else {
- clif_displaymessage(fd, msg_table[183]); // Pet friendly is already the good value.
+ clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
return -1;
}
} else {
- clif_displaymessage(fd, msg_table[37]); // An invalid number was specified.
return -1;
}
} else {
- clif_displaymessage(fd, msg_table[184]); // Sorry, but you have no pet.
+ clif_displaymessage(fd, msg_table[3]); // Character not found.
return -1;
}
return 0;
}
+
diff --git a/src/map/clif.c b/src/map/clif.c
index 9b5b16236..41cc4c13c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7051,6 +7051,17 @@ int clif_specialeffect(struct block_list *bl, int type, int flag) {
WBUFL(buf,2) = bl->id;
WBUFL(buf,6) = type;
+ if (flag == 3) {
+// struct map_session_data *sd;
+ struct map_session_data *pl_sd;
+ int i;
+ for(i = 0; i < fd_max; i++) {
+ if (session[i] && (pl_sd = session[i]->session_data) != NULL &&
+ pl_sd->state.auth &&
+ (pc_isGM((struct map_session_data *)&bl) > pc_isGM((struct map_session_data *)&pl_sd->bl)))
+ clif_specialeffect(&pl_sd->bl, type, 1);
+ }
+ }
if (flag == 2) {
struct map_session_data *sd;
int i;