Compare commits

...

14 Commits

Author SHA1 Message Date
Aleos
ca73989ae1 Merge branch 'master' into cleanup/removeonchangemap 2022-12-12 14:59:25 -05:00
Takius
a1798f7094 Fix skill SO_VARETYR_SPEAR (#7425)
* Corrects the hit type resulting in a variance of damage.
2022-12-12 10:53:40 -05:00
Singe Horizontal
1f1b5fe4a0 Restores Dispell removing NPC_AGIUP (#7479)
Fixes #7478
2022-12-11 11:06:07 +07:00
lighta
f7dbe79c34 Fix wedding skill checks (#5579)
* Fixes #5576 and fixes #7475.
* Fix WE_CALLPARTNER, WE_CALLPARENT and WE_CALLBABY fallthrough check.
* Adds usage of packet struct.
* Add autotrade check for WE_CALLPARTNER.
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Co-authored-by: aleos <aleos89@users.noreply.github.com>
2022-12-10 16:16:52 -05:00
Aleos
aa2bbaa31f Update GitHub workflows (#7477)
* Updates gcc to work on Ubuntu 22.04.
* Force clang to use Ubuntu 20.04 until some build errors are resolved in the environment.
* Adds a concurrency check to disable any active prior runs when pushing a new commit.
2022-12-09 14:53:25 -05:00
eppc0330
7bfae25c74 Fix grade upgrade fail announcement (#7189)
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2022-12-05 09:55:58 +01:00
rosald
5549ad2ac2 Update agit_start_se.txt (#7448) 2022-11-30 22:07:43 +01:00
Jittapan Pluemsumran
c9f23e691a Follow up to 4e638838de (#7468) 2022-11-30 15:11:25 +07:00
idk-whoami
795414de4f Removed duplicates list of menu items (#7459)
(from ghost palace exchange npc)
2022-11-29 14:24:24 +01:00
Jittapan Pluemsumran
4e638838de Corrected server response when adding an item to a trade session fails. (#7462)
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2022-11-29 13:24:34 +07:00
Aleos
0cd106f9f7 Merge branch 'master' into cleanup/removeonchangemap 2022-05-17 16:48:52 -04:00
aleos
0fce50bc9e Syncs up NoSave flag for several statuses 2022-05-17 12:19:07 -04:00
aleos
5e1fbcbefa Reverts unit_remove_map() static function change
* Reverts unit_remove_map() back to a macro as the preprocessors will point to the static function instead of the calling function.
* Adds third argument to unit_remove_map() macro for changing zone identification.
2022-05-16 15:24:46 -04:00
aleos
d637ecd967 Corrects zone change status removal behavior
* Removes the SCF_REMOVEONCHANGEMAP status flag as statuses with the SCF_NOSAVE flag are removed on zone changes.
* Adds the ability to check for zone changes in unit_remove_map().
* All unit types except for players have their SCF_REMOVEONMAPWARP statuses cleared in unit_remove_map().
* Removes the hardcode for Cloaking and Cloaking Exceed.
2022-05-16 13:15:54 -04:00
33 changed files with 282 additions and 179 deletions

View File

@@ -1,6 +1,10 @@
name: Build servers with Clang
# build_servers_clang.yml
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@@ -22,9 +26,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# The ubuntu-latest label currently points to ubuntu-20.04.
# The ubuntu-latest label currently points to ubuntu-22.04.
# Available: ubuntu-22.04, ubuntu-20.04
os: [ubuntu-latest]
os: [ubuntu-20.04]
# Version list can be found on https://github.com/marketplace/actions/install-clang
clang: ['6.0', '7', '8', '9', '10', '11'] #, '12', '13']

View File

@@ -1,6 +1,10 @@
name: Build servers with CMake
# build_servers_cmake.yml
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@@ -22,7 +26,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# The ubuntu-latest label currently points to ubuntu-20.04.
# The ubuntu-latest label currently points to ubuntu-22.04.
# Available: ubuntu-22.04, ubuntu-20.04
os: [ubuntu-latest]

View File

@@ -1,6 +1,10 @@
name: Build servers with GCC
# build_servers_gcc.yml
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@@ -22,11 +26,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# The ubuntu-latest label currently points to ubuntu-20.04.
# The ubuntu-latest label currently points to ubuntu-22.04.
# Available: ubuntu-22.04, ubuntu-20.04
os: [ubuntu-latest]
# Older versions of GCC are not available via unaltered aptitude repo lists.
gcc: ['7', '8', '9', '10']
gcc: ['9', '10', '11']
steps:
- uses: actions/checkout@v2

View File

@@ -1,6 +1,10 @@
name: Build servers in Pre-Renewal and Renewal
# build_servers_modes.yml
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@@ -22,11 +26,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# The ubuntu-latest label currently points to ubuntu-20.04.
# The ubuntu-latest label currently points to ubuntu-22.04.
# Available: ubuntu-22.04, ubuntu-20.04
os: [ubuntu-latest]
# Older versions of GCC are not available via unaltered aptitude repo lists.
gcc: ['10']
gcc: ['11']
# We run build checks for both Renewal and PRE-Renewal
mode: ['PRE','RE']

View File

@@ -1,6 +1,10 @@
name: Build servers with MSVS
# build_servers_msbuild.yml
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:

View File

@@ -1,6 +1,10 @@
name: Build servers with different packet versions
# build_servers_packetversions.yml
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@@ -22,11 +26,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# The ubuntu-latest label currently points to ubuntu-20.04.
# The ubuntu-latest label currently points to ubuntu-22.04.
# Available: ubuntu-22.04, ubuntu-20.04
os: [ubuntu-latest]
# Older versions of GCC are not available via unaltered aptitude repo lists.
gcc: ['10']
gcc: ['11']
# We run build checks for both Renewal and PRE-Renewal
mode: ['PRE','RE']
# Check build success for different packet-versions

View File

@@ -1,6 +1,10 @@
name: Build servers in VIP mode
# build_servers_vip.yml
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@@ -22,11 +26,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# The ubuntu-latest label currently points to ubuntu-20.04.
# The ubuntu-latest label currently points to ubuntu-22.04.
# Available: ubuntu-22.04, ubuntu-20.04
os: [ubuntu-latest]
# Older versions of GCC are not available via unaltered aptitude repo lists.
gcc: ['10']
gcc: ['11']
# We run build checks for both Renewal and PRE-Renewal
mode: ['PRE', 'RE']

View File

@@ -4,6 +4,10 @@ name: Validate NPC Scripts and DB Changes
# For NPC and DB validation we only need two builds: one of Renewal and one for Pre-Renewal checks.
# NPC scripts and database files are not platform dependent, so we can achieve this validation using only a simple linux setup.
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@@ -25,11 +29,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# The ubuntu-latest label currently points to ubuntu-20.04.
# The ubuntu-latest label currently points to ubuntu-22.04.
# Available: ubuntu-22.04, ubuntu-20.04
os: [ubuntu-latest]
# Only a single version of GCC is required for validating NPC scripts and database changes.
gcc: ['10']
gcc: ['11']
# We run build checks for both Renewal and PRE-Renewal
mode: ['PRE', 'RE']

View File

@@ -30,7 +30,9 @@
# Refine Required refine level.
# Chance Base chance of success out of 0~10000.
# Bonus Enchantgrade bonus. (Default: 0)
# Announce Announce if someone tries to increase the enchantgrade. (Default: true)
# AnnounceSuccess Announce on upgrade success. (Default: true)
# AnnounceFail Announce on upgrade failure. (Default: false)
# Announce Announce on upgrade success and failure.
# Catalyst: Catalyst item to increase chance of success.
# Item The item that can be used.
# AmountPerStep Amount of Item needed.
@@ -49,7 +51,7 @@
Header:
Type: ENCHANTGRADE_DB
Version: 1
Version: 2
Footer:
Imports:

View File

@@ -30,7 +30,9 @@
# Refine Required refine level.
# Chance Base chance of success out of 0~10000.
# Bonus Enchantgrade bonus. (Default: 0)
# Announce Announce if someone tries to increase the enchantgrade. (Default: true)
# AnnounceSuccess Announce on upgrade success. (Default: true)
# AnnounceFail Announce on upgrade failure. (Default: false)
# Announce Announce on upgrade success and failure.
# Catalyst: Catalyst item to increase chance of success.
# Item The item that can be used.
# AmountPerStep Amount of Item needed.
@@ -49,4 +51,4 @@
Header:
Type: ENCHANTGRADE_DB
Version: 1
Version: 2

View File

@@ -324,10 +324,11 @@ Body:
OnTouch: true
StopAttacking: true
RemoveOnDamaged: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
NoClearance: true
NoSave: true
EndOnStart:
Closeconfine: true
Closeconfine2: true
@@ -589,7 +590,7 @@ Body:
RemoveOnDamaged: true
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
EndOnStart:
Dancing: true
- Status: Loud
@@ -731,7 +732,8 @@ Body:
NoDispell: true
NoBanishingBuster: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
MinDuration: 5000
- Status: Keeping
DurationLookup: NPC_KEEPING
@@ -963,7 +965,8 @@ Body:
States:
NoMove: true
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
- Status: Bladestop
Icon: EFST_BLADESTOP
DurationLookup: MO_BLADESTOP
@@ -980,7 +983,7 @@ Body:
NoClearbuff: true
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Fireweapon
Icon: EFST_PROPERTYFIRE
DurationLookup: SA_FLAMELAUNCHER
@@ -1193,7 +1196,7 @@ Body:
Flags:
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Guildaura
Flags:
NoDispell: true
@@ -1285,10 +1288,11 @@ Body:
OnTouch: true
StopAttacking: true
RemoveOnDamaged: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
NoClearance: true
NoSave: true
- Status: Rejectsword
Icon: EFST_SWORDREJECT
DurationLookup: ST_REJECTSWORD
@@ -1305,7 +1309,8 @@ Body:
Opt3:
Marionette: true
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
Fail:
Marionette: true
- Status: Marionette2
@@ -1321,7 +1326,8 @@ Body:
Opt3:
Marionette: true
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
Fail:
Marionette2: true
- Status: Changeundead
@@ -1395,7 +1401,7 @@ Body:
DurationLookup: CR_DEVOTION
Flags:
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
OverlapIgnoreLevel: true
EndOnEnd:
Autoguard: true
@@ -1479,7 +1485,7 @@ Body:
Flags:
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Shadowweapon
Icon: EFST_PROPERTYDARK
DurationLookup: TK_SEVENWIND
@@ -1657,7 +1663,7 @@ Body:
NoClearance: true
NoSave: true
NoRemoveOnDead: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Closeconfine2
Icon: EFST_RG_CCONFINE_S
DurationLookup: RG_CLOSECONFINE
@@ -1670,7 +1676,7 @@ Body:
NoClearance: true
NoSave: true
NoRemoveOnDead: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Fail:
Closeconfine2: true
- Status: Dancing
@@ -1687,9 +1693,10 @@ Body:
NoDispell: true
NoBanishingBuster: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
RequireWeapon: true
OverlapIgnoreLevel: true
NoSave: true
EndOnEnd:
Longing: true
- Status: Elementalchange
@@ -1853,7 +1860,7 @@ Body:
StopWalking: true
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Debuff: true
- Status: Spurt
Icon: EFST_STRUP
@@ -1987,7 +1994,6 @@ Body:
Flags:
NoRemoveOnDead: true
NoClearbuff: true
NoDispell: true
NoBanishingBuster: true
NoClearance: true
- Status: Incmhprate
@@ -2170,8 +2176,8 @@ Body:
NoDispell: true
NoBanishingBuster: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
- Status: Sun_Comfort
Icon: EFST_SUN_COMFORT
DurationLookup: SG_SUN_COMFORT
@@ -2179,6 +2185,7 @@ Body:
Def2: true
Flags:
RemoveOnMapWarp: true
NoSave: true
- Status: Moon_Comfort
Icon: EFST_MOON_COMFORT
DurationLookup: SG_MOON_COMFORT
@@ -2186,6 +2193,7 @@ Body:
Flee: true
Flags:
RemoveOnMapWarp: true
NoSave: true
- Status: Star_Comfort
Icon: EFST_STAR_COMFORT
DurationLookup: SG_STAR_COMFORT
@@ -2193,6 +2201,7 @@ Body:
Aspd: true
Flags:
RemoveOnMapWarp: true
NoSave: true
- Status: Fusion
DurationLookup: SG_FUSION
CalcFlags:
@@ -2388,7 +2397,8 @@ Body:
Vit: true
Int: true
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
Fail:
Change: true
- Status: Bloodlust
@@ -3199,7 +3209,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Bite
Icon: EFST_WUGBITE
DurationLookup: RA_WUGBITE
@@ -3231,7 +3241,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Acceleration
Icon: EFST_ACCELERATION
DurationLookup: NC_ACCELERATION
@@ -3313,7 +3323,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Stealthfield
Icon: EFST_STEALTHFIELD
DurationLookup: NC_STEALTHFIELD
@@ -3336,7 +3346,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Overheat
Icon: EFST_OVERHEAT
Flags:
@@ -3745,7 +3755,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Debuff: true
Fail:
Hallucinationwalk: true
@@ -4132,7 +4142,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
StopAttacking: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Cursedcircle_Target
Icon: EFST_CURSEDCIRCLE_TARGET
DurationLookup: SR_CURSEDCIRCLE
@@ -4474,7 +4484,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: _Bodypaint
Icon: EFST_BODYPAINT
DurationLookup: SC_BODYPAINT
@@ -4608,7 +4618,8 @@ Body:
NoDispell: true
NoBanishingBuster: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
- Status: _Bloodylust
Icon: EFST_BLOODYLUST
DurationLookup: SC_BLOODYLUST
@@ -5202,7 +5213,7 @@ Body:
Flags:
StopWalking: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Tinder_Breaker2
Icon: EFST_TINDER_BREAKER
DurationLookup: MH_TINDER_BREAKER
@@ -5213,7 +5224,7 @@ Body:
Flags:
StopWalking: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Cbc
Icon: EFST_CBC
DurationLookup: MH_CBC
@@ -5747,7 +5758,7 @@ Body:
Flags:
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
- Status: Mtf_Aspd2
@@ -6052,7 +6063,6 @@ Body:
Flags:
StopAttacking: true
RemoveOnDamaged: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Su_Stoop
Icon: EFST_SU_STOOP
@@ -6618,7 +6628,8 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoClearbuff: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
- Status: Entry_Queue_Apply_Delay
Icon: EFST_ENTRY_QUEUE_APPLY_DELAY
Flags:
@@ -6690,7 +6701,7 @@ Body:
Icon: EFST_FLASHKICK
DurationLookup: SJ_FLASHKICK
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
NoClearance: true
@@ -6707,7 +6718,7 @@ Body:
NoClearance: true
StopAttacking: true
RemoveOnDamaged: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Fail:
Bite: true
- Status: Starstance

View File

@@ -30,7 +30,9 @@
# Refine Required refine level.
# Chance Base chance of success out of 0~10000.
# Bonus Enchantgrade bonus. (Default: 0)
# Announce Announce if someone tries to increase the enchantgrade. (Default: true)
# AnnounceSuccess Announce on upgrade success. (Default: true)
# AnnounceFail Announce on upgrade failure. (Default: false)
# Announce Announce on upgrade success and failure.
# Catalyst: Catalyst item to increase chance of success.
# Item The item that can be used.
# AmountPerStep Amount of Item needed.
@@ -49,7 +51,7 @@
Header:
Type: ENCHANTGRADE_DB
Version: 1
Version: 2
Body:
- Type: Armor
@@ -98,6 +100,7 @@ Body:
Refine: 11
Chance: 5000
Bonus: 50
AnnounceFail: true
Catalyst:
Item: Blessed_Etel_Dust
AmountPerStep: 5
@@ -117,6 +120,7 @@ Body:
Refine: 11
Chance: 4000
Bonus: 100
AnnounceFail: true
Catalyst:
Item: Blessed_Etel_Dust
AmountPerStep: 7
@@ -178,6 +182,7 @@ Body:
Refine: 11
Chance: 5000
Bonus: 50
AnnounceFail: true
Catalyst:
Item: Blessed_Etel_Dust
AmountPerStep: 5
@@ -197,6 +202,7 @@ Body:
Refine: 11
Chance: 4000
Bonus: 100
AnnounceFail: true
Catalyst:
Item: Blessed_Etel_Dust
AmountPerStep: 7

View File

@@ -27608,8 +27608,8 @@ Body:
DamageFlags:
Splash: true
Range: 9
Hit: Single
HitCount: -3
Hit: Multi_Hit
HitCount: 3
Element: Wind
SplashArea:
- Level: 1

View File

@@ -335,10 +335,11 @@ Body:
OnTouch: true
StopAttacking: true
RemoveOnDamaged: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
NoClearance: true
NoSave: true
EndOnStart:
Closeconfine: true
Closeconfine2: true
@@ -604,7 +605,7 @@ Body:
RemoveOnDamaged: true
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
EndOnStart:
Dancing: true
- Status: Loud
@@ -748,7 +749,8 @@ Body:
NoDispell: true
NoBanishingBuster: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
MinDuration: 5000
- Status: Keeping
DurationLookup: NPC_KEEPING
@@ -980,7 +982,8 @@ Body:
States:
NoMove: true
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
- Status: Bladestop
Icon: EFST_BLADESTOP
DurationLookup: MO_BLADESTOP
@@ -997,7 +1000,7 @@ Body:
NoClearbuff: true
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Fireweapon
Icon: EFST_PROPERTYFIRE
DurationLookup: SA_FLAMELAUNCHER
@@ -1301,7 +1304,7 @@ Body:
OnTouch: true
StopAttacking: true
RemoveOnDamaged: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
NoClearance: true
@@ -1321,7 +1324,8 @@ Body:
Opt3:
Marionette: true
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
Fail:
Marionette: true
- Status: Marionette2
@@ -1337,7 +1341,8 @@ Body:
Opt3:
Marionette: true
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
Fail:
Marionette2: true
- Status: Changeundead
@@ -1411,7 +1416,7 @@ Body:
DurationLookup: CR_DEVOTION
Flags:
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
OverlapIgnoreLevel: true
EndOnEnd:
Autoguard: true
@@ -1495,7 +1500,7 @@ Body:
Flags:
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Shadowweapon
Icon: EFST_PROPERTYDARK
DurationLookup: TK_SEVENWIND
@@ -1654,7 +1659,7 @@ Body:
NoClearance: true
NoSave: true
NoRemoveOnDead: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Closeconfine2
Icon: EFST_RG_CCONFINE_S
DurationLookup: RG_CLOSECONFINE
@@ -1667,7 +1672,7 @@ Body:
NoClearance: true
NoSave: true
NoRemoveOnDead: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Fail:
Closeconfine2: true
- Status: Dancing
@@ -1684,9 +1689,10 @@ Body:
NoDispell: true
NoBanishingBuster: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
RequireWeapon: true
OverlapIgnoreLevel: true
NoSave: true
EndOnEnd:
EnsembleFatigue: true
- Status: Elementalchange
@@ -1962,7 +1968,7 @@ Body:
StopWalking: true
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Debuff: true
- Status: Spurt
Icon: EFST_STRUP
@@ -2101,7 +2107,6 @@ Body:
Flags:
NoRemoveOnDead: true
NoClearbuff: true
NoDispell: true
NoBanishingBuster: true
NoClearance: true
- Status: Incmhprate
@@ -2284,8 +2289,8 @@ Body:
NoDispell: true
NoBanishingBuster: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
- Status: Sun_Comfort
Icon: EFST_SUN_COMFORT
DurationLookup: SG_SUN_COMFORT
@@ -2293,6 +2298,7 @@ Body:
Def2: true
Flags:
RemoveOnMapWarp: true
NoSave: true
- Status: Moon_Comfort
Icon: EFST_MOON_COMFORT
DurationLookup: SG_MOON_COMFORT
@@ -2300,6 +2306,7 @@ Body:
Flee: true
Flags:
RemoveOnMapWarp: true
NoSave: true
- Status: Star_Comfort
Icon: EFST_STAR_COMFORT
DurationLookup: SG_STAR_COMFORT
@@ -2307,6 +2314,7 @@ Body:
Aspd: true
Flags:
RemoveOnMapWarp: true
NoSave: true
- Status: Fusion
DurationLookup: SG_FUSION
CalcFlags:
@@ -2500,7 +2508,8 @@ Body:
Vit: true
Int: true
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
Fail:
Change: true
- Status: Bloodlust
@@ -3323,7 +3332,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Bite
Icon: EFST_WUGBITE
DurationLookup: RA_WUGBITE
@@ -3355,7 +3364,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Acceleration
Icon: EFST_ACCELERATION
DurationLookup: NC_ACCELERATION
@@ -3442,7 +3451,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Stealthfield
Icon: EFST_STEALTHFIELD
DurationLookup: NC_STEALTHFIELD
@@ -3466,7 +3475,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Overheat
Icon: EFST_OVERHEAT
Flags:
@@ -3905,7 +3914,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Debuff: true
Fail:
Hallucinationwalk: true
@@ -4300,7 +4309,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
StopAttacking: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
SendVal3: true
- Status: Cursedcircle_Target
Icon: EFST_CURSEDCIRCLE_TARGET
@@ -4648,7 +4657,7 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
SendVal3: true
- Status: _Bodypaint
Icon: EFST_BODYPAINT
@@ -4799,7 +4808,8 @@ Body:
NoDispell: true
NoBanishingBuster: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
- Status: _Bloodylust
Icon: EFST_BLOODYLUST
DurationLookup: SC_BLOODYLUST
@@ -5472,7 +5482,7 @@ Body:
Flee: true
Flags:
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Tinder_Breaker2
Icon: EFST_TINDER_BREAKER
DurationLookup: MH_TINDER_BREAKER
@@ -5480,7 +5490,7 @@ Body:
Flee: true
Flags:
NoSave: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Fail:
Tinder_Breaker2: true
- Status: Cbc
@@ -6020,7 +6030,7 @@ Body:
Flags:
NoSave: true
NoClearance: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
- Status: Extremityfist2
@@ -6359,7 +6369,6 @@ Body:
Flags:
StopAttacking: true
RemoveOnDamaged: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
- Status: Su_Stoop
Icon: EFST_SU_STOOP
@@ -6951,7 +6960,8 @@ Body:
NoBanishingBuster: true
NoClearance: true
NoClearbuff: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoSave: true
- Status: Entry_Queue_Apply_Delay
Icon: EFST_ENTRY_QUEUE_APPLY_DELAY
Flags:
@@ -7035,7 +7045,7 @@ Body:
Icon: EFST_FLASHKICK
DurationLookup: SJ_FLASHKICK
Flags:
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
NoClearance: true
@@ -7054,7 +7064,7 @@ Body:
NoClearance: true
StopAttacking: true
RemoveOnDamaged: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
Fail:
Bite: true
- Status: Starstance
@@ -7619,7 +7629,7 @@ Body:
BlEffect: true
DisplayPc: true
OverlapIgnoreLevel: true
RemoveOnChangeMap: true
RemoveOnMapWarp: true
NoBanishingBuster: true
NoDispell: true
NoClearance: true

View File

@@ -226,7 +226,6 @@ Flags: Various status flags for specific status change events.
RemoveOnRefresh - Removed by RK_REFRESH.
RemoveOnLuxAnima - Removed by RK_LUXANIMA.
RemoveOnMapWarp - Removed when warping to another map.
RemoveOnChangeMap - Removed when changing map-server.
RemoveChemicalProtect - Removed by AM_CP_ARMOR/AM_CP_HELM/AM_CP_SHIELD/AM_CP_WEAPON.
RemoveElementalOption - Removed by elemental changing modes/quitting/EL_TIDAL_WEAPON/EL_WATER_SCREEN on the master and elemental.
RemoveOnUnequip - Removed when unequipping any type of equipment.

View File

@@ -25,7 +25,7 @@ OnAgitInit2:
// starting time checks
if((gettime(DT_DAYOFWEEK)==TUESDAY) && (gettime(DT_HOUR)>=18 && gettime(DT_HOUR)<21) ||
(gettime(DT_DAYOFWEEK)==THURSDAY) && (gettime(DT_HOUR)>=18 && gettime(DT_HOUR)<21) ||
(gettime(DT_DAYOFWEEK)==SATURDAY) && (gettime(DT_HOUR)>=22 && gettime(DT_HOUR)<23)) {
(gettime(DT_DAYOFWEEK)==SATURDAY) && (gettime(DT_HOUR)>=21 && gettime(DT_HOUR)<23)) {
if (!agitcheck2()) {
AgitStart2;
}

View File

@@ -68,8 +68,7 @@ dali02,51,130,4 script Dimension Traveler 4_F_SHABBY,{
27184, 10000, // Knight Sakray Card
23676, 50, // Gray Charcoal Melee (Melee)
23677, 50, // Gray Charcoal Magic (Magic)
23678, 50, // Gray Charcoal Range (Range)
27184, 10000; // Knight Sakray Card
23678, 50; // Gray Charcoal Range (Range)
break;
}
.@size = getarraysize(.@items);

View File

@@ -4671,17 +4671,14 @@ void clif_tradeadditem( struct map_session_data* sd, struct map_session_data* ts
/// 0 = success
/// 1 = overweight
/// 2 = trade canceled
void clif_tradeitemok(struct map_session_data* sd, int index, int fail)
void clif_tradeitemok(struct map_session_data& sd, int index, e_exitem_add_result result)
{
int fd;
nullpo_retv(sd);
PACKET_ZC_ACK_ADD_EXCHANGE_ITEM p = {};
p.packetType = HEADER_ZC_ACK_ADD_EXCHANGE_ITEM;
p.index = client_index(index);
p.result = static_cast<uint8>(result);
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0xea));
WFIFOW(fd,0) = 0xea;
WFIFOW(fd,2) = index;
WFIFOB(fd,4) = fail;
WFIFOSET(fd,packet_len(0xea));
clif_send(&p, sizeof(p), &sd.bl, SELF);
}
@@ -9381,26 +9378,23 @@ void clif_wedding_effect(struct block_list *bl)
/// Notifies the client of the name of the partner character (ZC_COUPLENAME).
/// 01e6 <partner name>.24B
void clif_callpartner(struct map_session_data *sd)
void clif_callpartner(struct map_session_data& sd)
{
unsigned char buf[26];
PACKET_ZC_COUPLENAME p = { 0 };
nullpo_retv(sd);
p.packetType = HEADER_ZC_COUPLENAME;
WBUFW(buf,0) = 0x1e6;
if( sd->status.partner_id ) {
const char *p = map_charid2nick(sd->status.partner_id);
struct map_session_data *p_sd = pc_get_partner(sd);
if( p != NULL && p_sd != NULL && !p_sd->state.autotrade )
safestrncpy(WBUFCP(buf,2), p, NAME_LENGTH);
if( sd.status.partner_id ) {
struct map_session_data *p_sd = pc_get_partner(&sd);
if (p_sd != nullptr && !p_sd->state.autotrade)
safestrncpy(p.name, p_sd->status.name, NAME_LENGTH);
else
WBUFB(buf,2) = 0;
p.name[0] = 0;
} else {// Send zero-length name if no partner, to initialize the client buffer.
WBUFB(buf,2) = 0;
p.name[0] = 0;
}
clif_send(buf, packet_len(0x1e6), &sd->bl, AREA);
clif_send(&p, sizeof(p), &sd.bl, AREA);
}
@@ -12435,7 +12429,7 @@ void clif_parse_TradeAddItem(int fd,struct map_session_data *sd)
if( index == 0 )
trade_tradeaddzeny(sd, amount);
else
trade_tradeadditem(sd, index, (short)amount);
trade_tradeadditem(sd, server_index(index), (short)amount);
}
@@ -23639,12 +23633,12 @@ void clif_parse_enchantgrade_start( int fd, struct map_session_data* sd ){
clif_enchantgrade_result( *sd, index, ENCHANTGRADE_UPGRADE_SUCCESS );
// Check if it has to be announced
if( enchantgradelevel->announce ){
if( enchantgradelevel->announceSuccess ){
clif_enchantgrade_announce( *sd, sd->inventory.u.items_inventory[index], true );
}
}else{
// Check if it has to be announced (has to be done before deleting the item from inventory)
if( enchantgradelevel->announce ){
if( enchantgradelevel->announceFail ){
clif_enchantgrade_announce( *sd, sd->inventory.u.items_inventory[index], false );
}

View File

@@ -596,6 +596,14 @@ enum e_memorial_dungeon_command : uint16 {
COMMAND_MEMORIALDUNGEON_DESTROY_FORCE = 0x3,
};
enum e_exitem_add_result : uint8 {
EXITEM_ADD_SUCCEED,
EXITEM_ADD_FAILED_OVERWEIGHT,
EXITEM_ADD_FAILED_CLOSED,
EXITEM_ADD_FAILED_OVERCOUNT,
EXITEM_ADD_FAILED_EACHITEM_OVERCOUNT,
};
int clif_setip(const char* ip);
void clif_setbindip(const char* ip);
void clif_setport(uint16 port);
@@ -679,7 +687,7 @@ void clif_emotion(struct block_list *bl,int type);
void clif_talkiebox(struct block_list* bl, const char* talkie);
void clif_wedding_effect(struct block_list *bl);
void clif_divorced(struct map_session_data* sd, const char* name);
void clif_callpartner(struct map_session_data *sd);
void clif_callpartner(struct map_session_data& sd);
void clif_playBGM( struct map_session_data& sd, const char* name );
void clif_soundeffect( struct block_list& bl, const char* name, int type, enum send_target target );
void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, t_tick tick);
@@ -690,7 +698,7 @@ void clif_hotkeys_send(struct map_session_data *sd, int tab);
void clif_traderequest(struct map_session_data* sd, const char* name);
void clif_tradestart(struct map_session_data* sd, uint8 type);
void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd, int index, int amount);
void clif_tradeitemok(struct map_session_data* sd, int index, int fail);
void clif_tradeitemok(struct map_session_data& sd, int index, e_exitem_add_result result);
void clif_tradedeal_lock(struct map_session_data* sd, int fail);
void clif_tradecancelled(struct map_session_data* sd);
void clif_tradecompleted(struct map_session_data* sd, int fail);

View File

@@ -209,7 +209,7 @@ int elemental_delete(s_elemental_data *ed) {
sd->ed = NULL;
sd->status.ele_id = 0;
return unit_remove_map(&ed->bl, CLR_OUTSIGHT);
return unit_remove_map(&ed->bl, CLR_OUTSIGHT, false);
}
void elemental_summon_init(s_elemental_data *ed) {

View File

@@ -313,7 +313,7 @@ int hom_vaporize(struct map_session_data *sd, int flag)
status_change_end(&sd->bl, SC_HOMUN_TIME);
#endif
return unit_remove_map(&hd->bl, CLR_OUTSIGHT);
return unit_remove_map(&hd->bl, CLR_OUTSIGHT, false);
}
/**
@@ -339,7 +339,7 @@ int hom_delete(struct homun_data *hd, int emote)
// Send homunculus_dead to client
hd->homunculus.hp = 0;
clif_hominfo(sd, hd, 0);
return unit_remove_map(&hd->bl,CLR_OUTSIGHT);
return unit_remove_map(&hd->bl,CLR_OUTSIGHT, false);
}
/**
@@ -660,7 +660,7 @@ int hom_evolution(struct homun_data *hd)
hom->luk += 10*rnd_value(min->luk, max->luk);
hom->intimacy = battle_config.homunculus_evo_intimacy_reset;
unit_remove_map(&hd->bl, CLR_OUTSIGHT);
unit_remove_map(&hd->bl, CLR_OUTSIGHT, false);
if (map_addblock(&hd->bl))
return 0;
@@ -711,7 +711,7 @@ int hom_mutate(struct homun_data *hd, int homun_id)
return 0;
}
unit_remove_map(&hd->bl, CLR_OUTSIGHT);
unit_remove_map(&hd->bl, CLR_OUTSIGHT, false);
if(map_addblock(&hd->bl))
return 0;

View File

@@ -291,7 +291,7 @@ int mercenary_delete(s_mercenary_data *md, int reply) {
}
clif_mercenary_message(sd, reply);
return unit_remove_map(&md->bl, CLR_OUTSIGHT);
return unit_remove_map(&md->bl, CLR_OUTSIGHT, false);
}
/**

View File

@@ -1105,7 +1105,7 @@ int mob_spawn (struct mob_data *md)
md->last_thinktime = tick;
if (md->bl.prev != NULL)
unit_remove_map(&md->bl,CLR_RESPAWN);
unit_remove_map(&md->bl,CLR_RESPAWN, false);
else
if (md->spawn && md->mob_id != md->spawn->id)
{
@@ -6696,7 +6696,7 @@ void mob_reload_itemmob_data(void) {
static int mob_reload_sub( struct mob_data *md, va_list args ){
// Slaves have to be killed
if( md->master_id != 0 ){
unit_remove_map( &md->bl, CLR_OUTSIGHT );
unit_remove_map( &md->bl, CLR_OUTSIGHT, false);
return 0;
}
@@ -6709,7 +6709,7 @@ static int mob_reload_sub( struct mob_data *md, va_list args ){
ShowDebug( "mob_reload_sub: The monster was removed from map %s (%hu/%hu).\n", map_mapid2mapname( md->bl.m ), md->bl.x, md->bl.y );
}
unit_remove_map( &md->bl, CLR_OUTSIGHT );
unit_remove_map( &md->bl, CLR_OUTSIGHT, false);
return 0;
}

View File

@@ -407,6 +407,17 @@ struct PACKET_ZC_ACK_OPEN_BANKING{
int16 unknown;
} __attribute__((packed));
struct PACKET_ZC_ACK_ADD_EXCHANGE_ITEM {
int16 packetType;
uint16 index;
uint8 result;
} __attribute__((packed));
struct PACKET_ZC_COUPLENAME {
int16 packetType;
char name[NAME_LENGTH];
} __attribute__((packed));
// NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#if !defined( sun ) && ( !defined( __NETBSD__ ) || __NetBSD_Version__ >= 600000000 )
#pragma pack( pop )
@@ -416,6 +427,7 @@ DEFINE_PACKET_HEADER(ZC_NOTIFY_CHAT, 0x8d)
DEFINE_PACKET_HEADER(ZC_BROADCAST, 0x9a)
DEFINE_PACKET_HEADER(ZC_ITEM_ENTRY, 0x9d)
DEFINE_PACKET_HEADER(ZC_PC_PURCHASE_RESULT, 0xca)
DEFINE_PACKET_HEADER(ZC_ACK_ADD_EXCHANGE_ITEM, 0xea)
DEFINE_PACKET_HEADER(ZC_MVP_GETTING_ITEM, 0x10a)
DEFINE_PACKET_HEADER(CZ_REQ_CHANGE_MEMBERPOS, 0x155)
DEFINE_PACKET_HEADER(CZ_REQMAKINGITEM, 0x18e)
@@ -432,6 +444,7 @@ DEFINE_PACKET_HEADER(ZC_BROADCAST2, 0x1c3)
#else
DEFINE_PACKET_HEADER(ZC_CHANGE_GUILD, 0x1b4)
#endif
DEFINE_PACKET_HEADER(ZC_COUPLENAME, 0x1e6);
DEFINE_PACKET_HEADER(ZC_FRIENDS_LIST, 0x201)
DEFINE_PACKET_HEADER(ZC_NOTIFY_WEAPONITEMLIST, 0x221)
DEFINE_PACKET_HEADER(ZC_ACK_WEAPONREFINE, 0x223)

View File

@@ -6774,7 +6774,7 @@ enum e_setpos pc_setpos(struct map_session_data* sd, unsigned short mapindex, in
npc_script_event(sd, NPCE_LOGOUT);
//remove from map, THEN change x/y coordinates
unit_remove_map_pc(sd,clrtype);
unit_remove_map_pc(sd,clrtype,true);
sd->mapindex = mapindex;
sd->bl.x=x;
sd->bl.y=y;

View File

@@ -1316,7 +1316,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
if(rnd()%10000 < pet_catch_rate) {
achievement_update_objective(sd, AG_TAMING, 1, md->mob_id);
unit_remove_map(&md->bl,CLR_OUTSIGHT);
unit_remove_map(&md->bl,CLR_OUTSIGHT, false);
status_kill(&md->bl);
clif_pet_roulette(sd,1);
@@ -2299,7 +2299,7 @@ void pet_evolution(struct map_session_data *sd, int16 pet_id) {
clif_additem(sd, idx, 1, 0);
// Remove the old pet from sight
unit_remove_map(&sd->pd->bl, CLR_OUTSIGHT);
unit_remove_map(&sd->pd->bl, CLR_OUTSIGHT, false);
// Prepare the new pet
sd->pd->pet.class_ = pet_id;

View File

@@ -9787,7 +9787,6 @@
export_constant(SCF_SETSTAND);
export_constant(SCF_FAILEDMADO);
export_constant(SCF_DEBUFF);
export_constant(SCF_REMOVEONCHANGEMAP);
export_constant(SCF_REMOVEONMAPWARP);
export_constant(SCF_REMOVECHEMICALPROTECT);
export_constant(SCF_OVERLAPIGNORELEVEL);

View File

@@ -12799,25 +12799,37 @@ TIMER_FUNC(skill_castend_id){
//These should become skill_castend_pos
switch (ud->skill_id) {
case WE_CALLPARTNER:
if (sd)
clif_callpartner(sd);
if (sd) {
map_session_data *p_sd = pc_get_partner(sd);
if (p_sd && p_sd->state.autotrade) {
fail = true;
break;
} else
clif_callpartner(*sd);
}
break;
case WE_CALLPARENT:
if (sd) {
struct map_session_data *f_sd = pc_get_father(sd);
struct map_session_data *m_sd = pc_get_mother(sd);
map_session_data *f_sd = pc_get_father(sd);
map_session_data *m_sd = pc_get_mother(sd);
if ((f_sd && f_sd->state.autotrade) || (m_sd && m_sd->state.autotrade)) {
fail = true;
break;
}
}
break;
case WE_CALLBABY:
if (sd) {
struct map_session_data *c_sd = pc_get_child(sd);
map_session_data *c_sd = pc_get_child(sd);
if (c_sd && c_sd->state.autotrade) {
fail = true;
break;
}
}
break;
case AM_RESURRECTHOMUN:
case PF_SPIDERWEB:
{

View File

@@ -700,6 +700,34 @@ uint64 EnchantgradeDatabase::parseBodyNode( const ryml::NodeRef& node ){
}
}
if( this->nodeExists( gradeNode, "AnnounceSuccess" ) ){
bool announce;
if( !this->asBool( gradeNode, "AnnounceSuccess", announce ) ){
return 0;
}
grade->announceSuccess = announce;
}else{
if( !gradeExists ){
grade->announceSuccess = true;
}
}
if( this->nodeExists( gradeNode, "AnnounceFail" ) ){
bool announce;
if( !this->asBool( gradeNode, "AnnounceFail", announce) ){
return 0;
}
grade->announceFail = announce;
}else{
if( !gradeExists ){
grade->announceFail = false;
}
}
if( this->nodeExists( gradeNode, "Announce" ) ){
bool announce;
@@ -707,11 +735,8 @@ uint64 EnchantgradeDatabase::parseBodyNode( const ryml::NodeRef& node ){
return 0;
}
grade->announce = announce;
}else{
if( !gradeExists ){
grade->announce = true;
}
grade->announceSuccess = announce;
grade->announceFail = announce;
}
if( this->nodeExists( gradeNode, "Catalyst") ){
@@ -1578,7 +1603,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 dhp, in
if(flag&4) // Delete from memory. (also invokes map removal code)
unit_free(target,CLR_DEAD);
else if(flag&2) // remove from map
unit_remove_map(target,CLR_DEAD);
unit_remove_map(target,CLR_DEAD, false);
else { // Some death states that would normally be handled by unit_remove_map
unit_stop_attack(target);
unit_stop_walking(target,1);

View File

@@ -168,7 +168,8 @@ struct s_enchantgradelevel{
uint16 refine;
uint16 chance;
uint16 bonus;
bool announce;
bool announceSuccess;
bool announceFail;
struct{
t_itemid item;
uint16 amountPerStep;
@@ -185,7 +186,7 @@ struct s_enchantgrade{
class EnchantgradeDatabase : public TypesafeYamlDatabase<uint16, s_enchantgrade>{
public:
EnchantgradeDatabase() : TypesafeYamlDatabase( "ENCHANTGRADE_DB", 1 ){
EnchantgradeDatabase() : TypesafeYamlDatabase( "ENCHANTGRADE_DB", 2, 1 ){
}
@@ -2907,7 +2908,6 @@ enum e_status_change_flag : uint16 {
SCF_SETSTAND,
SCF_FAILEDMADO,
SCF_DEBUFF,
SCF_REMOVEONCHANGEMAP,
SCF_REMOVEONMAPWARP,
SCF_REMOVECHEMICALPROTECT,
SCF_OVERLAPIGNORELEVEL,

View File

@@ -362,12 +362,10 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount)
}
if( !amount ) { // Why do this.. ~.~ just send an ack, the item won't display on the trade window.
clif_tradeitemok(sd, index, 0);
clif_tradeitemok(*sd, -2, EXITEM_ADD_SUCCEED); // We pass -2 which will becomes 0 in clif_tradeitemok (Official behavior)
return;
}
index -= 2; // 0 is for zeny, 1 is unknown. Gravity, go figure...
// Item checks...
if( index < 0 || index >= MAX_INVENTORY )
return;
@@ -381,7 +379,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount)
if( !itemdb_cantrade(item, src_lv, dst_lv) && // Can't trade
(pc_get_partner(sd) != target_sd || !itemdb_canpartnertrade(item, src_lv, dst_lv)) ) { // Can't partner-trade
clif_displaymessage (sd->fd, msg_txt(sd,260));
clif_tradeitemok(sd, index+2, 1);
clif_tradeitemok(*sd, index, EXITEM_ADD_FAILED_CLOSED);
return;
}
@@ -390,13 +388,13 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount)
if( item->expire_time ) { // Rental System
clif_displaymessage (sd->fd, msg_txt(sd,260));
clif_tradeitemok(sd, index+2, 1);
clif_tradeitemok(*sd, index, EXITEM_ADD_FAILED_CLOSED);
return;
}
if( ((item->bound == BOUND_ACCOUNT || item->bound > BOUND_GUILD) || (item->bound == BOUND_GUILD && sd->status.guild_id != target_sd->status.guild_id)) && !pc_can_give_bounded_items(sd) ) { // Item Bound
clif_displaymessage(sd->fd, msg_txt(sd,293));
clif_tradeitemok(sd, index+2, 1);
clif_tradeitemok(*sd, index, EXITEM_ADD_FAILED_CLOSED);
return;
}
@@ -411,13 +409,13 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount)
// Locate a trade position
ARR_FIND( 0, 10, trade_i, sd->deal.item[trade_i].index == index || sd->deal.item[trade_i].amount == 0 );
if( trade_i == 10 ) { // No space left
clif_tradeitemok(sd, index+2, 1);
// clif_tradeitemok(*sd, index, EXITEM_ADD_FAILED_OVERWEIGHT); // We do not know if the server respond with this or not since the official client prevents this case client-side.
return;
}
trade_weight = sd->inventory_data[index]->weight * amount;
if( target_sd->weight + sd->deal.weight + trade_weight > target_sd->max_weight ) { // fail to add item -- the player was over weighted.
clif_tradeitemok(sd, index+2, 1);
clif_tradeitemok(*sd, index, EXITEM_ADD_FAILED_OVERWEIGHT);
return;
}
@@ -435,7 +433,7 @@ void trade_tradeadditem(struct map_session_data *sd, short index, short amount)
sd->deal.weight += trade_weight;
clif_tradeitemok(sd, index+2, 0); // Return the index as it was received
clif_tradeitemok(*sd, index, EXITEM_ADD_SUCCEED); // Return the index as it was received
clif_tradeadditem(sd, target_sd, index+2, amount);
}
@@ -486,7 +484,7 @@ void trade_tradeok(struct map_session_data *sd)
}
sd->state.deal_locked = 1;
clif_tradeitemok(sd, 0, 0);
clif_tradeitemok(*sd, -2, EXITEM_ADD_SUCCEED); // We pass -2 which will becomes 0 in clif_tradeitemok (Official behavior)
clif_tradedeal_lock(sd, 0);
clif_tradedeal_lock(target_sd, 1);
}

View File

@@ -1335,7 +1335,7 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type)
if (bl->type == BL_PC) // Use pc_setpos
return pc_setpos((TBL_PC*)bl, map_id2index(m), x, y, type);
if (!unit_remove_map(bl, type))
if (!unit_remove_map(bl, type, false))
return 3;
if (bl->m != m && battle_config.clear_unit_onwarp &&
@@ -3036,7 +3036,7 @@ int unit_changetarget(struct block_list *bl, va_list ap) {
* @param file, line, func: Call information for debug purposes
* @return Success(1); Couldn't be removed or bl was free'd(0)
*/
int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file, int line, const char* func)
int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file, int line, const char* func, bool changeZone)
{
struct unit_data *ud = unit_bl2ud(bl);
struct status_change *sc = status_get_sc(bl);
@@ -3069,13 +3069,12 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
ud->attackabletime = ud->canmove_tick /*= ud->canact_tick*/ = gettick();
if(sc && sc->count ) { // map-change/warp dispells.
status_db.removeByStatusFlag(bl, { SCF_REMOVEONCHANGEMAP });
if (changeZone) // Zone change calls the general NoSave statuses.
status_db.removeByStatusFlag(bl, { SCF_NOSAVE });
if (bl->type != BL_PC) // Players are cleared in pc_setpos.
status_db.removeByStatusFlag(bl, { SCF_REMOVEONMAPWARP });
// Ensure the bl is a PC; if so, we'll handle the removal of cloaking and cloaking exceed later
if ( bl->type != BL_PC ) {
status_change_end(bl, SC_CLOAKING);
status_change_end(bl, SC_CLOAKINGEXCEED);
}
if (sc->data[SC_GOSPEL] && sc->data[SC_GOSPEL]->val4 == BCT_SELF)
status_change_end(bl, SC_GOSPEL);
if (sc->data[SC_PROVOKE] && sc->data[SC_PROVOKE]->val4 == 1)
@@ -3128,12 +3127,6 @@ int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file,
if( !sd->npc_ontouch_.empty() )
npc_touchnext_areanpc(sd,true);
// Check if warping and not changing the map.
if ( sd->state.warping && !sd->state.changemap ) {
status_change_end(bl, SC_CLOAKING);
status_change_end(bl, SC_CLOAKINGEXCEED);
}
sd->npc_shopid = 0;
sd->adopt_invite = 0;
@@ -3323,25 +3316,25 @@ void unit_refresh(struct block_list *bl, bool walking) {
* 0: Assume bl is being warped
* 1: Death, appropriate cleanup performed
*/
void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype)
void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype, bool changeZone)
{
unit_remove_map(&sd->bl,clrtype);
unit_remove_map(&sd->bl,clrtype, changeZone);
//CLR_RESPAWN is the warp from logging out, CLR_TELEPORT is the warp from teleporting, but pets/homunc need to just 'vanish' instead of showing the warping animation.
if (clrtype == CLR_RESPAWN || clrtype == CLR_TELEPORT)
clrtype = CLR_OUTSIGHT;
if(sd->pd)
unit_remove_map(&sd->pd->bl, clrtype);
unit_remove_map(&sd->pd->bl, clrtype, changeZone);
if(hom_is_active(sd->hd))
unit_remove_map(&sd->hd->bl, clrtype);
unit_remove_map(&sd->hd->bl, clrtype, changeZone);
if(sd->md)
unit_remove_map(&sd->md->bl, clrtype);
unit_remove_map(&sd->md->bl, clrtype, changeZone);
if(sd->ed)
unit_remove_map(&sd->ed->bl, clrtype);
unit_remove_map(&sd->ed->bl, clrtype, changeZone);
}
/**
@@ -3383,7 +3376,7 @@ int unit_free(struct block_list *bl, clr_type clrtype)
map_freeblock_lock();
if( bl->prev ) // Players are supposed to logout with a "warp" effect.
unit_remove_map(bl, clrtype);
unit_remove_map(bl, clrtype, false);
switch( bl->type ) {
case BL_PC: {

View File

@@ -165,11 +165,11 @@ void unit_skillunit_maxcount(unit_data& ud, uint16 skill_id, int& maxcount);
// Remove unit
struct unit_data* unit_bl2ud(struct block_list *bl);
void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype);
void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype, bool changeZone = false);
void unit_refresh(struct block_list *bl, bool walking = false);
void unit_free_pc(struct map_session_data *sd);
#define unit_remove_map(bl,clrtype) unit_remove_map_(bl,clrtype,__FILE__,__LINE__,__func__)
int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file, int line, const char* func);
#define unit_remove_map(bl,clrtype,changeZone) unit_remove_map_(bl,clrtype,__FILE__,__LINE__,__func__,changeZone)
int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file, int line, const char* func, bool changeZone = false);
int unit_free(struct block_list *bl, clr_type clrtype);
int unit_changeviewsize(struct block_list *bl,short size);
int unit_changetarget(struct block_list *bl,va_list ap);