Changeset 19 for src/map/mob.c

Show
Ignore:
Timestamp:
07/02/08 12:20:18 (17 years ago)
Author:
jinshiro
Message:

Now Compiles with Cygwin GCC

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/map/mob.c

    r5 r19  
    548548        barricade->amount = 0; 
    549549        barricade->killable = killable; 
    550         barricade->shootable = shootable; 
    551         barricade->walkable = walkable; 
     550         
     551        // A protection just in case setting a walkable - non shootable 
     552        if( (barricade->walkable = walkable) == true ) 
     553                barricade->shootable = true; 
     554        else 
     555                barricade->shootable = shootable; 
    552556         
    553557        for( i = 0; i < count; i++ ) 
     
    570574                } 
    571575 
    572                 if( !barricade->walkable ) map_setcell(m, x1, y1, CELL_WALKABLE, false); 
    573                 map_setcell(m, x1, y1, CELL_SHOOTABLE, barricade->shootable); 
     576                if( !barricade->walkable ) 
     577                { 
     578                        map_setcell(m, x1, y1, CELL_WALKABLE, false); 
     579                        map_setcell(m, x1, y1, CELL_SHOOTABLE, barricade->shootable); 
     580                } 
    574581 
    575582                clif_changemapcell(0, m, x1, y1, map_getcell(barricade->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); 
     
    626633                mob_barricade_nextxy(barricade->x, barricade->y, barricade->dir, i, &x1, &y1); 
    627634 
    628                 if( !barricade->walkable ) map_setcell(barricade->m, x1, y1, CELL_WALKABLE, true); 
    629                 map_setcell(barricade->m, x1, y1, CELL_SHOOTABLE, !barricade->shootable); 
     635                if( !barricade->shootable ) 
     636                        map_setcell(barricade->m, x1, y1, CELL_SHOOTABLE, true); 
     637                if( !barricade->walkable ) 
     638                        map_setcell(barricade->m, x1, y1, CELL_WALKABLE, true); 
     639 
    630640                clif_changemapcell(0, barricade->m, x1, y1, map_getcell(barricade->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); 
    631641        } 
     
    688698                        mob_barricade_nextxy(barricade->x, barricade->y, barricade->dir, i, &x1, &y1); 
    689699 
    690                         if( !barricade->walkable ) map_setcell(barricade->m, x1, y1, CELL_WALKABLE, true); 
    691                         map_setcell(barricade->m, x1, y1, CELL_SHOOTABLE, !barricade->shootable); 
     700                        if( !barricade->shootable ) 
     701                                map_setcell(barricade->m, x1, y1, CELL_SHOOTABLE, true); 
     702                        if( !barricade->walkable ) 
     703                                map_setcell(barricade->m, x1, y1, CELL_WALKABLE, true); 
     704 
    692705                        clif_changemapcell(0, barricade->m, x1, y1, map_getcell(barricade->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); 
    693706                } 
     
    20152028                /*if (md2->master_id && battle_config.retaliate_to_master) 
    20162029                        md->attacked_id = md2->master_id;*/ 
    2017 //UNCOMMENT IF ERROR OCCURS WITH CUSTOM JOBS V 
    2018 //if (md2->master_id && battle_config.retaliate_to_master) 
    2019                 //BEGIN Custom Jobs (blackmagic) 
    2020                         { 
     2030                        if (md2->master_id && battle_config.retaliate_to_master) 
     2031        { 
    20212032                //necro_retaliation config (same as above, but only works for adept/necro/warlock summons) [Brainstorm] 
    20222033                if(!battle_config.necro_retaliation && (md2->class_ >= 3100 && md2->class_ <= 3235)) 
     
    20242035                else md->attacked_id = md2->master_id; //All normal summons 
    20252036        } 
    2026                         //end 
     2037 
    20272038                else 
    20282039                        md->attacked_id = src->id; 
     
    28252836} 
    28262837 
    2827 //Begin Custom Jobs (blackmagic) 
    28282838/// Count slaves with a certain master and class. by FlavioJS [Brain] 
    28292839static int mob_countslave_class_sub(struct block_list* bl, va_list ap) 
     
    28602870} 
    28612871 
    2862 //End 
    28632872 
    28642873/*========================================== 
     
    40234032                "mob_poring.txt", 
    40244033                "mob_boss.txt", 
    4025                 "mob_pouch.txt" 
    4026                 //Begin custom Jobs (blackmagic 
    4027                 "mob_familiar.txt" // familiar By FlavioJS [Brain] 
     4034                "mob_pouch.txt", 
     4035                "mob_familiar.txt" 
    40284036        }; 
    4029         //end 
    40304037 
    40314038        memset(&summon, 0, sizeof(summon));