diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-12-14 23:38:11 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-12-14 23:38:11 +0000 |
commit | 1382b22cd68bf90f2adc4ae13187416982f9a12f (patch) | |
tree | 60602ab8f3578407bffbd1859603c3a586c52256 /src/map/mob.c | |
parent | 78474fe9877675f3fc173f0b7e7235fd6c105067 (diff) | |
download | hercules-1382b22cd68bf90f2adc4ae13187416982f9a12f.tar.gz hercules-1382b22cd68bf90f2adc4ae13187416982f9a12f.tar.bz2 hercules-1382b22cd68bf90f2adc4ae13187416982f9a12f.tar.xz hercules-1382b22cd68bf90f2adc4ae13187416982f9a12f.zip |
Guardian hp handling code removal (see bugreport:342)
- removed guardian hp from the castle data structure, database, savefiles and various script functions (use upgrade_svn11914.sql)
- removed guardian hp calculation and manipulation from the castle manager npc, now the hp values are updated by the server itself (glitch: when castle defense changes, all guardians are healed to full)
- tweaked script function 'guardianinfo' to provide some data needed by the manager npc (currently available are hp, maxhp and visibility); also, it doesn't need a player attached to execute anymore
The whole thing is experimental, use at your own risk (seems to work though...)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11915 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 2d0eb04b9..c58ce5e17 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -439,7 +439,6 @@ static int mob_spawn_guardian_sub(int tid,unsigned int tick,int id,int data) { //Safe removal of guardian. md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0; guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0); - guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0); } unit_free(&md->bl,0); //Remove guardian. } @@ -1734,9 +1733,6 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage) if (src) mob_log_damage(md, src, damage); } - if(md->guardian_data && md->guardian_data->number < MAX_GUARDIANS) // guardian hp update [Valaris] (updated by [Skotlex]) - md->guardian_data->castle->guardian[md->guardian_data->number].hp = md->status.hp; - if (battle_config.show_mob_info&3) clif_charnameack (0, &md->bl); @@ -1779,10 +1775,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) status = &md->status; if(md->guardian_data && md->guardian_data->number < MAX_GUARDIANS) - { // guardian hp update [Valaris] (updated by [Skotlex]) guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0); - guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0); - } md->state.skillstate = MSS_DEAD; mobskill_use(md,tick,-1); //On Dead skill. @@ -2291,7 +2284,6 @@ int mob_guardian_guildchange(struct block_list *bl,va_list ap) { //Safe removal of guardian. md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0; guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0); - guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0); } unit_free(&md->bl,0); //Remove guardian. } @@ -2304,7 +2296,6 @@ int mob_guardian_guildchange(struct block_list *bl,va_list ap) ShowError("mob_guardian_guildchange: New Guild (id %d) does not exists!\n", md->guardian_data->guild_id); md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0; guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0); - guild_castledatasave(md->guardian_data->castle->castle_id, 18+md->guardian_data->number,0); unit_free(&md->bl,0); return 0; } @@ -2412,10 +2403,6 @@ int mob_class_change (struct mob_data *md, int class_) *------------------------------------------*/ void mob_heal(struct mob_data *md,unsigned int heal) { - if(md->guardian_data && md->guardian_data->number < MAX_GUARDIANS) - // guardian hp update [Valaris] (updated by [Skotlex]) - md->guardian_data->castle->guardian[md->guardian_data->number].hp = md->status.hp; - if (battle_config.show_mob_info&3) clif_charnameack (0, &md->bl); } |