Sfoglia il codice sorgente

Some typos
* Changed -1 for timer id to INVALID_TIMER
* Changed values for pc_bound_chk(). 2 to BOUND_GUILD and 3 to BOUND_PARTY

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>

Cydh Ramdh 10 anni fa
parent
commit
4d5fc9604c
4 ha cambiato i file con 14 aggiunte e 14 eliminazioni
  1. 1 1
      src/map/clif.c
  2. 2 2
      src/map/guild.c
  3. 10 10
      src/map/instance.c
  4. 1 1
      src/map/party.c

+ 1 - 1
src/map/clif.c

@@ -4170,7 +4170,7 @@ static void clif_getareachar_pc(struct map_session_data* sd,struct map_session_d
 		(sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
 		pc_has_permission(sd, PC_PERM_VIEW_HPMETER)
 	)
-		clif_hpmeter_single(sd->fd, dstsd->bl.id, dstsd->battle_status.hp, dstsd->battle_status.max_hp);
+	clif_hpmeter_single(sd->fd, dstsd->bl.id, dstsd->battle_status.hp, dstsd->battle_status.max_hp);
 
 	// display link (sd - dstsd) to sd
 	ARR_FIND( 0, MAX_DEVOTION, i, sd->devotion[i] == dstsd->bl.id );

+ 2 - 2
src/map/guild.c

@@ -844,7 +844,7 @@ void guild_retrieveitembound(int char_id,int aid,int guild_id) {
 	if(sd){ //Character is online
 		int idxlist[MAX_INVENTORY];
 		int j;
-		j = pc_bound_chk(sd,2,idxlist);
+		j = pc_bound_chk(sd,BOUND_GUILD,idxlist);
 		if(j) {
 			struct guild_storage* stor = guild2storage(sd->status.guild_id);
 			int i;
@@ -1804,7 +1804,7 @@ int guild_break(struct map_session_data *sd,char *name) {
 
 #ifdef BOUND_ITEMS
 	//Guild bound item check - Removes the bound flag
-	j = pc_bound_chk(sd,2,idxlist);
+	j = pc_bound_chk(sd,BOUND_GUILD,idxlist);
 	for(i=0;i<j;i++)
 		sd->status.inventory[idxlist[i]].bound = BOUND_NONE;
 #endif

+ 10 - 10
src/map/instance.c

@@ -139,7 +139,7 @@ static int instance_startkeeptimer(struct instance_data *im, short instance_id)
 	nullpo_retr(0, im);
 
 	// No timer
-	if(im->keep_timer != -1)
+	if(im->keep_timer != INVALID_TIMER)
 		return 1;
 
 	if((db = instance_searchtype_db(im->type)) == NULL)
@@ -168,7 +168,7 @@ static int instance_startidletimer(struct instance_data *im, short instance_id)
 	nullpo_retr(1, im);
 
 	// No current timer
-	if(im->idle_timer != -1)
+	if(im->idle_timer != INVALID_TIMER)
 		return 1;
 
 	// Add the timer
@@ -195,13 +195,13 @@ static int instance_stopidletimer(struct instance_data *im)
 	nullpo_retr(0, im);
 	
 	// No timer
-	if(im->idle_timer == -1)
+	if(im->idle_timer == INVALID_TIMER)
 		return 1;
 
 	// Delete the timer - Party has returned or instance is destroyed
 	im->idle_limit = 0;
 	delete_timer(im->idle_timer, instance_delete_timer);
-	im->idle_timer = -1;
+	im->idle_timer = INVALID_TIMER;
 
 	// Notify the party
 	if( ( p = party_search( im->party_id ) ) != NULL )
@@ -284,9 +284,9 @@ int instance_create(int party_id, const char *name)
 	instance_data[i].state = INSTANCE_IDLE;
 	instance_data[i].party_id = p->party.party_id;
 	instance_data[i].keep_limit = 0;
-	instance_data[i].keep_timer = -1;
+	instance_data[i].keep_timer = INVALID_TIMER;
 	instance_data[i].idle_limit = 0;
-	instance_data[i].idle_timer = -1;
+	instance_data[i].idle_timer = INVALID_TIMER;
 	instance_data[i].vars = idb_alloc(DB_OPT_RELEASE_DATA);
 	memset(instance_data[i].map, 0, sizeof(instance_data[i].map));
 
@@ -450,13 +450,13 @@ int instance_destroy(short instance_id)
 			map_delinstancemap(im->map[i].m);
 	}
 
-	if(im->keep_timer != -1) {
+	if(im->keep_timer != INVALID_TIMER) {
 		delete_timer(im->keep_timer, instance_delete_timer);
-		im->keep_timer = -1;
+		im->keep_timer = INVALID_TIMER;
 	}
-	if(im->idle_timer != -1) {
+	if(im->idle_timer != INVALID_TIMER) {
 		delete_timer(im->idle_timer, instance_delete_timer);
-		im->idle_timer = -1;
+		im->idle_timer = INVALID_TIMER;
 	}
 
 	if((p = party_search(im->party_id))) {

+ 1 - 1
src/map/party.c

@@ -625,7 +625,7 @@ int party_member_withdraw(int party_id, int account_id, int char_id)
 		int idxlist[MAX_INVENTORY]; //or malloc to reduce consumtion
 		int j,i;
 
-		j = pc_bound_chk(sd,3,idxlist);
+		j = pc_bound_chk(sd,BOUND_PARTY,idxlist);
 
 		for(i = 0; i < j; i++)
 			pc_delitem(sd,idxlist[i],sd->status.inventory[idxlist[i]].amount,0,1,LOG_TYPE_OTHER);