Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions db/re/skill_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9895,7 +9895,7 @@ Body:
Hit: Single
HitCount: 1
CastTime: 700
Duration1: 60000
Duration1: 180000
FixedCastTime: 700
CastTimeFlags:
IgnoreDex: true
Expand Down Expand Up @@ -37404,25 +37404,25 @@ Body:
SpCost: 100
ApCost:
- Level: 1
Amount: 152
Amount: 156
- Level: 2
Amount: 149
Amount: 152
- Level: 3
Amount: 146
Amount: 148
- Level: 4
Amount: 143
Amount: 144
- Level: 5
Amount: 140
- Level: 6
Amount: 137
Amount: 136
- Level: 7
Amount: 134
Amount: 132
- Level: 8
Amount: 131
- Level: 9
Amount: 128
- Level: 9
Amount: 124
- Level: 10
Amount: 125
Amount: 120
Status: Shadow_Exceed
- Id: 5286
Name: SHC_DANCING_KNIFE
Expand Down Expand Up @@ -37729,7 +37729,7 @@ Body:
FixedCastTime: 500
Requires:
SpCost: 150
ApCost: 150
ApCost: 120
Status: Darkcrow
- Id: 5295
Name: MT_AXE_STOMP
Expand Down
37 changes: 28 additions & 9 deletions src/map/atcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ static const char* atcommand_help_string( const char* command ){
return info->help.c_str();
}

/// Normalize path separators so Windows-style paths work on all platforms.
static void atcommand_normalize_npc_path(char* dst, const char* src, size_t size) {
safestrncpy(dst, src, size);
for (char* p = dst; *p; ++p)
if (*p == '\\')
*p = '/';
}

/*==========================================
* @send (used for testing packet sends from the client)
Expand Down Expand Up @@ -5350,16 +5357,19 @@ ACMD_FUNC(loadnpc)
clif_displaymessage(fd, msg_txt(sd,1132)); // Please enter a script file name (usage: @loadnpc <file name>).
return -1;
}

if (!npc_addsrcfile(message, true)) {

char path[1024];
atcommand_normalize_npc_path(path, message, sizeof(path));

if (!npc_addsrcfile(path, true)) {
clif_displaymessage(fd, msg_txt(sd,261)); // Script could not be loaded.
return -1;
}

npc_read_event_script();

ShowStatus( "NPC file '" CL_WHITE "%s" CL_RESET "' was loaded.\n", message );
npc_event_doall_path( script_config.init_event_name, message );
ShowStatus( "NPC file '" CL_WHITE "%s" CL_RESET "' was loaded.\n", path );
npc_event_doall_path( script_config.init_event_name, path );

clif_displaymessage(fd, msg_txt(sd,262)); // Script loaded.
return 0;
Expand Down Expand Up @@ -5396,18 +5406,21 @@ ACMD_FUNC(reloadnpcfile) {
return -1;
}

if (npc_unloadfile(message))
char path[1024];
atcommand_normalize_npc_path(path, message, sizeof(path));

if (npc_unloadfile(path))
clif_displaymessage(fd, msg_txt(sd,1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed.

if (!npc_addsrcfile(message, true)) {
if (!npc_addsrcfile(path, true)) {
clif_displaymessage(fd, msg_txt(sd,261)); // Script could not be loaded.
return -1;
}

npc_read_event_script();

ShowStatus( "NPC file '" CL_WHITE "%s" CL_RESET "' was reloaded.\n", message );
npc_event_doall_path( script_config.init_event_name, message );
ShowStatus( "NPC file '" CL_WHITE "%s" CL_RESET "' was reloaded.\n", path );
npc_event_doall_path( script_config.init_event_name, path );

clif_displaymessage(fd, msg_txt(sd,262)); // Script loaded.
return 0;
Expand Down Expand Up @@ -10358,12 +10371,18 @@ ACMD_FUNC(unloadnpcfile) {
return -1;
}

if( npc_unloadfile(message) )
char path[1024];
atcommand_normalize_npc_path(path, message, sizeof(path));

if( npc_unloadfile(path) ) {
clif_displaymessage(fd, msg_txt(sd,1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
ShowStatus( "NPC file '" CL_WHITE "%s" CL_RESET "' was unloaded.\n", path );
}
else {
clif_displaymessage(fd, msg_txt(sd,1387)); // File not found.
return -1;
}

return 0;
}
ACMD_FUNC(cart) {
Expand Down
2 changes: 1 addition & 1 deletion src/map/clif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ static inline bool clif_npc_mayapurple( const block_list& bl ){
}

/// For the stupid cloth-dye bug. Resends the given view data to the area specified by bl.
void clif_refresh_clothcolor( const block_list& bl, enum send_target target, block_list* tbl = nullptr ){
void clif_refresh_clothcolor( const block_list& bl, enum send_target target, const block_list* tbl = nullptr ){
// Unconfirmed when this was fixed, if you encounter any problems, feel free to report them
#if PACKETVER < 20091103
const view_data* vd = status_get_viewdata( &bl );
Expand Down
6 changes: 4 additions & 2 deletions src/map/skills/mage/astralstrike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ void SkillAstralStrike::calculateSkillRatio(const Damage *wd, const block_list *
const status_data* sstatus = status_get_status_data(*src);
const status_data* tstatus = status_get_status_data(*target);

skillratio += -100 + 300 + 1800 * skill_lv + 10 * sstatus->spl;
skillratio += -100 + 700 + 2600 * skill_lv;
skillratio += 10 * sstatus->spl;

if (tstatus->race == RC_UNDEAD || tstatus->race == RC_DRAGON)
skillratio += 100 + 300 * skill_lv;
skillratio += 150 * skill_lv;
RE_LVL_DMOD(100);
}

Expand Down
8 changes: 6 additions & 2 deletions src/map/skills/mage/crystalimpact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ void SkillCrystalImpact::modifyDamageData(Damage& dmg, const block_list& src, co
void SkillCrystalImpact::calculateSkillRatio(const Damage *wd, const block_list *src, const block_list *target, uint16 skill_lv, int32 &skillratio, int32 mflag) const {
const status_data* sstatus = status_get_status_data(*src);

skillratio += -100 + 250 + 1300 * skill_lv + 5 * sstatus->spl;
skillratio += -100 + 400 + 1400 * skill_lv;
skillratio += 10 * sstatus->spl;

// (climax buff applied with pc_skillatk_bonus)
RE_LVL_DMOD(100);
}
Expand Down Expand Up @@ -66,7 +68,9 @@ SkillCrystalImpactAttack::SkillCrystalImpactAttack() : SkillImplRecursiveDamageS
void SkillCrystalImpactAttack::calculateSkillRatio(const Damage *wd, const block_list *src, const block_list *target, uint16 skill_lv, int32 &skillratio, int32 mflag) const {
const status_data* sstatus = status_get_status_data(*src);

skillratio += -100 + 250 + 1300 * skill_lv + 5 * sstatus->spl;
skillratio += -100 + 400 + 1400 * skill_lv;
skillratio += 10 * sstatus->spl;

// (climax buff applied with pc_skillatk_bonus)
RE_LVL_DMOD(100);
}
Expand Down
4 changes: 3 additions & 1 deletion src/map/skills/mage/destructivehurricane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ void SkillDestructiveHurricane::modifyDamageData(Damage& dmg, const block_list&
void SkillDestructiveHurricane::calculateSkillRatio(const Damage *wd, const block_list *src, const block_list *target, uint16 skill_lv, int32 &skillratio, int32 mflag) const {
const status_data* sstatus = status_get_status_data(*src);

skillratio += -100 + 600 + 2850 * skill_lv + 5 * sstatus->spl;
skillratio += -100 + 600 + 3250 * skill_lv;
skillratio += 10 * sstatus->spl;

// (climax buff applied with pc_skillatk_bonus)
RE_LVL_DMOD(100);
}
Expand Down
4 changes: 3 additions & 1 deletion src/map/skills/mage/soulvulcanstrike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ SkillSoulVulcanStrike::SkillSoulVulcanStrike() : SkillImplRecursiveDamageSplash(
void SkillSoulVulcanStrike::calculateSkillRatio(const Damage *wd, const block_list *src, const block_list *target, uint16 skill_lv, int32 &skillratio, int32 mflag) const {
const status_data* sstatus = status_get_status_data(*src);

skillratio += -100 + 300 * skill_lv + 3 * sstatus->spl;
skillratio += -100 + 50 + 330 * skill_lv;
skillratio += 3 * sstatus->spl;

RE_LVL_DMOD(100);
}
4 changes: 3 additions & 1 deletion src/map/skills/thief/impactcrater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ SkillImpactCrater::SkillImpactCrater() : SkillImplRecursiveDamageSplash(SHC_IMPA
void SkillImpactCrater::calculateSkillRatio(const Damage *wd, const block_list *src, const block_list *target, uint16 skill_lv, int32 &skillratio, int32 mflag) const {
const status_data* sstatus = status_get_status_data(*src);

skillratio += -100 + 80 * skill_lv + 5 * sstatus->pow;
skillratio += -100 + 200 * skill_lv;
skillratio += 5 * sstatus->pow;

RE_LVL_DMOD(100);
}

Expand Down
4 changes: 2 additions & 2 deletions src/map/skills/thief/savageimpact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ void SkillSavageImpact::calculateSkillRatio(const Damage *wd, const block_list *
const status_data* sstatus = status_get_status_data(*src);
const status_change *sc = status_get_sc(src);

skillratio += -100 + 105 * skill_lv;
skillratio += -100 + 130 * skill_lv;
skillratio += 5 * sstatus->pow;

if( sc != nullptr && sc->hasSCE( SC_SHADOW_EXCEED ) ){
skillratio += 20 * skill_lv;
skillratio += 30 * skill_lv;
skillratio += 2 * sstatus->pow;
}

Expand Down
Loading