summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-12 16:17:57 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-09-12 16:17:57 +0000
commit18b8ec2594cd4a8748d8c69a82f61c8637ef400e (patch)
treea2a6dc8206c57bc0e47cd46378ffca7a4524d598 /src/map/pc.c
parentbe57ed26ac11ed0bb696acb031df527e3edf3130 (diff)
downloadhercules-18b8ec2594cd4a8748d8c69a82f61c8637ef400e.tar.gz
hercules-18b8ec2594cd4a8748d8c69a82f61c8637ef400e.tar.bz2
hercules-18b8ec2594cd4a8748d8c69a82f61c8637ef400e.tar.xz
hercules-18b8ec2594cd4a8748d8c69a82f61c8637ef400e.zip
- Updated battle_switch to use strncmpi instead of strcmpi, it makes it so using "yessir" will match "yes", this is actually needed because if you set a config setting to "yes " (notice the trailing space), then the map config engine fails to read it right, and will set the config setting to 0 (no).
- Added function pc_resethate to more easily handle Angel trigger - Made feel_var and hate_var static variables to pc.c to simplify things and avoid errors due to redundancy. - Updated the show_mob_info setting to add another space to the separating pipes, so that each field is separated by " | " instead of " |". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8721 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index f6bed1846..057e5e59d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -66,6 +66,9 @@ static int GM_num = 0;
#define MOTD_LINE_SIZE 128
char motd_text[MOTD_LINE_SIZE][256]; // Message of the day buffer [Valaris]
+static const char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
+static const char hate_var[3][NAME_LENGTH] = {"PC_HATE_MOB_SUN","PC_HATE_MOB_MOON","PC_HATE_MOB_STAR"};
+
int pc_isGM(struct map_session_data *sd) {
int i;
@@ -796,8 +799,6 @@ int pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl)
int pc_reg_received(struct map_session_data *sd)
{
int i,j;
- const char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
- const char hate_var[3][NAME_LENGTH] = {"PC_HATE_MOB_SUN","PC_HATE_MOB_MOON","PC_HATE_MOB_STAR"};
sd->change_level = pc_readglobalreg(sd,"jobchange_level");
sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER");
@@ -4732,7 +4733,6 @@ int pc_resetskill(struct map_session_data* sd, int flag)
int pc_resetfeel(struct map_session_data* sd)
{
int i;
- char feel_var[3][NAME_LENGTH] = {"PC_FEEL_SUN","PC_FEEL_MOON","PC_FEEL_STAR"};
nullpo_retr(0, sd);
for (i=0; i<3; i++)
@@ -4745,6 +4745,19 @@ int pc_resetfeel(struct map_session_data* sd)
return 0;
}
+int pc_resethate(struct map_session_data* sd)
+{
+ int i;
+ nullpo_retr(0, sd);
+
+ for (i=0; i<3; i++)
+ {
+ sd->hate_mob[i] = -1;
+ pc_setglobalreg(sd,hate_var[i],0);
+ }
+ return 0;
+}
+
static int pc_respawn(int tid,unsigned int tick,int id,int data)
{
struct map_session_data *sd = map_id2sd(id);