Changeset 19 for src/map/mob.c
- Timestamp:
- 07/02/08 12:20:18 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
src/map/mob.c
r5 r19 548 548 barricade->amount = 0; 549 549 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; 552 556 553 557 for( i = 0; i < count; i++ ) … … 570 574 } 571 575 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 } 574 581 575 582 clif_changemapcell(0, m, x1, y1, map_getcell(barricade->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); … … 626 633 mob_barricade_nextxy(barricade->x, barricade->y, barricade->dir, i, &x1, &y1); 627 634 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 630 640 clif_changemapcell(0, barricade->m, x1, y1, map_getcell(barricade->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); 631 641 } … … 688 698 mob_barricade_nextxy(barricade->x, barricade->y, barricade->dir, i, &x1, &y1); 689 699 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 692 705 clif_changemapcell(0, barricade->m, x1, y1, map_getcell(barricade->m, x1, y1, CELL_GETTYPE), ALL_SAMEMAP); 693 706 } … … 2015 2028 /*if (md2->master_id && battle_config.retaliate_to_master) 2016 2029 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 { 2021 2032 //necro_retaliation config (same as above, but only works for adept/necro/warlock summons) [Brainstorm] 2022 2033 if(!battle_config.necro_retaliation && (md2->class_ >= 3100 && md2->class_ <= 3235)) … … 2024 2035 else md->attacked_id = md2->master_id; //All normal summons 2025 2036 } 2026 //end 2037 2027 2038 else 2028 2039 md->attacked_id = src->id; … … 2825 2836 } 2826 2837 2827 //Begin Custom Jobs (blackmagic)2828 2838 /// Count slaves with a certain master and class. by FlavioJS [Brain] 2829 2839 static int mob_countslave_class_sub(struct block_list* bl, va_list ap) … … 2860 2870 } 2861 2871 2862 //End2863 2872 2864 2873 /*========================================== … … 4023 4032 "mob_poring.txt", 4024 4033 "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" 4028 4036 }; 4029 //end4030 4037 4031 4038 memset(&summon, 0, sizeof(summon));