summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/battleground.h1
-rw-r--r--src/map/instance.c6
-rw-r--r--src/map/mob.c9
-rw-r--r--src/map/packets_struct.h8
-rw-r--r--src/map/skill.c8
-rw-r--r--src/map/skill.h4
7 files changed, 21 insertions, 21 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index d03afc431..06e9c01bd 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1554,7 +1554,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
if( sd && sd->status.party_id ){
struct map_session_data* psd;
- int static p_sd[5] = {0, 0, 0, 0, 0}, c; // just limit it to 5
+ int p_sd[5] = {0, 0, 0, 0, 0}, c; // just limit it to 5
c = 0;
memset (p_sd, 0, sizeof(p_sd));
@@ -1594,7 +1594,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
break;
case LG_RAYOFGENESIS:
{
- int16 lv = skill_lv;
+ uint16 lv = skill_lv;
int bandingBonus = 0;
if( sc && sc->data[SC_BANDING] )
bandingBonus = 200 * (sd ? skill->check_pc_partner(sd,skill_id,&lv,skill->get_splash(skill_id,skill_lv),0) : 1);
@@ -2378,7 +2378,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
case WM_GREAT_ECHO:
skillratio += 800 + 100 * skill_lv;
if( sd ) { // Still need official value [pakpil]
- short lv = (short)skill_lv;
+ uint16 lv = skill_lv;
skillratio += 100 * skill->check_pc_partner(sd,skill_id,&lv,skill->get_splash(skill_id,skill_lv),0);
}
break;
diff --git a/src/map/battleground.h b/src/map/battleground.h
index 88d75f953..36f6f0cee 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -6,6 +6,7 @@
#define _BATTLEGROUND_H_
#include "../common/mmo.h" // struct party
+#include "clif.h"
#include "guild.h"
/**
diff --git a/src/map/instance.c b/src/map/instance.c
index 9207c1d53..3f4b29a89 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -118,15 +118,15 @@ int instance_create(int owner_id, const char *name, enum instance_owner_type typ
if( j == *icptr ) {
switch( type ) {
case IOT_CHAR:
- RECREATE(sd->instance, unsigned short, ++*icptr);
+ RECREATE(sd->instance, short, ++*icptr);
sd->instance[sd->instances-1] = i;
break;
case IOT_PARTY:
- RECREATE(p->instance, unsigned short, ++*icptr);
+ RECREATE(p->instance, short, ++*icptr);
p->instance[p->instances-1] = i;
break;
case IOT_GUILD:
- RECREATE(g->instance, unsigned short, ++*icptr);
+ RECREATE(g->instance, short, ++*icptr);
g->instance[g->instances-1] = i;
break;
}
diff --git a/src/map/mob.c b/src/map/mob.c
index 7482a9d56..71c81749a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3868,13 +3868,12 @@ static bool mob_parse_dbrow(char** str)
id->mob[k].id = class_;
}
}
-
// Finally insert monster's data into the database.
if (mob_db_data[class_] == NULL)
- mob_db_data[class_] = (struct mob_db*)aCalloc(1, sizeof(struct mob_db));
+ mob_db_data[class_] = (struct mob_db*)aMalloc(sizeof(struct mob_db));
else
//Copy over spawn data
- memcpy(&db->spawn, mob_db_data[class_]->spawn, sizeof(db->spawn));
+ memcpy(&db->spawn, mob_db_data[class_]->spawn, sizeof(db->spawn));
memcpy(mob_db_data[class_], db, sizeof(struct mob_db));
return true;
@@ -4608,10 +4607,10 @@ static void mob_load(void)
void mob_reload(void) {
int i;
-
+
//Mob skills need to be cleared before re-reading them. [Skotlex]
for (i = 0; i < MAX_MOB_DB; i++)
- if (mob_db_data[i]) {
+ if (mob_db_data[i] && !mob_is_clone(i)) {
memset(&mob_db_data[i]->skill,0,sizeof(mob_db_data[i]->skill));
mob_db_data[i]->maxskill=0;
}
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 8e7506686..f6e6a8a3f 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -112,7 +112,7 @@ enum packet_headers {
struct packet_authok {
short PacketType;
unsigned int startTime;
- char PosDir[3];
+ unsigned char PosDir[3];
unsigned char xSize;
unsigned char ySize;
#if PACKETVER >= 20080102
@@ -217,7 +217,7 @@ struct packet_spawn_unit {
#endif
bool isPKModeON;
unsigned char sex;
- char PosDir[3];
+ unsigned char PosDir[3];
unsigned char xSize;
unsigned char ySize;
short clevel;
@@ -276,7 +276,7 @@ struct packet_unit_walking {
#endif
bool isPKModeON;
unsigned char sex;
- char MoveData[6];
+ unsigned char MoveData[6];
unsigned char xSize;
unsigned char ySize;
short clevel;
@@ -334,7 +334,7 @@ struct packet_idle_unit {
#endif
bool isPKModeON;
unsigned char sex;
- char PosDir[3];
+ unsigned char PosDir[3];
unsigned char xSize;
unsigned char ySize;
unsigned char state;
diff --git a/src/map/skill.c b/src/map/skill.c
index b8ac90225..da35bbbd3 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -173,7 +173,7 @@ const char* skill_get_desc( uint16 skill_id ) {
}
// out of bounds error checking [celest]
-void skill_chk(int16* skill_id) {
+void skill_chk(uint16* skill_id) {
*skill_id = skill->get_index(*skill_id); // checks/adjusts id
}
@@ -8755,7 +8755,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
sc_start2(bl,type,100,skill_lv,sc->data[type]->val2,skill->get_time(skill_id,skill_lv));
}
} else if( sd ) {
- short lv = (short)skill_lv;
+ uint16 lv = skill_lv;
int count = skill->check_pc_partner(sd,skill_id,&lv,skill->get_splash(skill_id,skill_lv),1);
if( sc_start2(bl,type,100,skill_lv,count,skill->get_time(skill_id,skill_lv)) )
party_foreachsamemap(skill->area_sub,sd,skill->get_splash(skill_id,skill_lv),src,skill_id,skill_lv,tick,flag|BCT_PARTY|1,skill->castend_nodamage_id);
@@ -8770,7 +8770,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
if( flag&1 ) {
sc_start2(bl,type,100,skill_lv,skill_area_temp[0],skill->get_time(skill_id,skill_lv));
} else { // These affect to all targets arround the caster.
- short lv = (short)skill_lv;
+ uint16 lv = skill_lv;
skill_area_temp[0] = (sd) ? skill->check_pc_partner(sd,skill_id,&lv,skill->get_splash(skill_id,skill_lv),1) : 50; // 50% chance in non BL_PC (clones).
iMap->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id,skill_lv),BL_PC, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|1, skill->castend_nodamage_id);
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
@@ -12257,7 +12257,7 @@ int skill_check_condition_char_sub (struct block_list *bl, va_list ap) {
/*==========================================
* Checks and stores partners for ensemble skills [Skotlex]
*------------------------------------------*/
-int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, short* skill_lv, int range, int cast_flag) {
+int skill_check_pc_partner (struct map_session_data *sd, uint16 skill_id, uint16* skill_lv, int range, int cast_flag) {
static int c=0;
static int p_sd[2] = { 0, 0 };
int i;
diff --git a/src/map/skill.h b/src/map/skill.h
index a2eed585f..cff2fc0cf 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1792,7 +1792,7 @@ struct skill_interface {
const char* (*get_name) ( uint16 skill_id );
const char* (*get_desc) ( uint16 skill_id );
/* check */
- void (*chk) (int16* skill_id);
+ void (*chk) (uint16* skill_id);
/* whether its CAST_GROUND, CAST_DAMAGE or CAST_NODAMAGE */
int (*get_casttype) (uint16 skill_id);
int (*get_casttype2) (uint16 index);
@@ -1828,7 +1828,7 @@ struct skill_interface {
int (*check_condition_castend) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
int (*consume_requirement) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type);
struct skill_condition (*get_requirement) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
- int (*check_pc_partner) (struct map_session_data *sd, uint16 skill_id, short* skill_lv, int range, int cast_flag);
+ int (*check_pc_partner) (struct map_session_data *sd, uint16 skill_id, uint16* skill_lv, int range, int cast_flag);
int (*unit_move) (struct block_list *bl,unsigned int tick,int flag);
int (*unit_onleft) (uint16 skill_id, struct block_list *bl,unsigned int tick);
int (*unit_onout) (struct skill_unit *src, struct block_list *bl, unsigned int tick);