Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
7925d1cd
Commit
7925d1cd
authored
Apr 17, 2022
by
Melledy
Browse files
Initial commit
parents
Changes
354
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/managers/ChatManager.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.managers
;
import
emu.grasscutter.commands.PlayerCommands
;
import
emu.grasscutter.game.GenshinPlayer
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.server.game.GameServer
;
import
emu.grasscutter.server.packet.send.PacketPlayerChatNotify
;
import
emu.grasscutter.server.packet.send.PacketPrivateChatNotify
;
public
class
ChatManager
{
private
final
GameServer
server
;
public
ChatManager
(
GameServer
server
)
{
this
.
server
=
server
;
}
public
GameServer
getServer
()
{
return
server
;
}
public
void
sendPrivChat
(
GenshinPlayer
player
,
int
targetUid
,
String
message
)
{
// Sanity checks
if
(
message
==
null
||
message
.
length
()
==
0
)
{
return
;
}
// Check if command
if
(
message
.
charAt
(
0
)
==
'!'
)
{
PlayerCommands
.
handle
(
player
,
message
);
return
;
}
// Get target
GenshinPlayer
target
=
getServer
().
getPlayerById
(
targetUid
);
if
(
target
==
null
)
{
return
;
}
// Create chat packet
GenshinPacket
packet
=
new
PacketPrivateChatNotify
(
player
.
getId
(),
target
.
getId
(),
message
);
player
.
sendPacket
(
packet
);
target
.
sendPacket
(
packet
);
}
public
void
sendPrivChat
(
GenshinPlayer
player
,
int
targetUid
,
int
emote
)
{
// Get target
GenshinPlayer
target
=
getServer
().
getPlayerById
(
targetUid
);
if
(
target
==
null
)
{
return
;
}
// Create chat packet
GenshinPacket
packet
=
new
PacketPrivateChatNotify
(
player
.
getId
(),
target
.
getId
(),
emote
);
player
.
sendPacket
(
packet
);
target
.
sendPacket
(
packet
);
}
public
void
sendTeamChat
(
GenshinPlayer
player
,
int
channel
,
String
message
)
{
// Sanity checks
if
(
message
==
null
||
message
.
length
()
==
0
)
{
return
;
}
// Check if command
if
(
message
.
charAt
(
0
)
==
'!'
)
{
PlayerCommands
.
handle
(
player
,
message
);
return
;
}
// Create and send chat packet
player
.
getWorld
().
broadcastPacket
(
new
PacketPlayerChatNotify
(
player
,
channel
,
message
));
}
public
void
sendTeamChat
(
GenshinPlayer
player
,
int
channel
,
int
icon
)
{
// Create and send chat packet
player
.
getWorld
().
broadcastPacket
(
new
PacketPlayerChatNotify
(
player
,
channel
,
icon
));
}
}
src/main/java/emu/grasscutter/game/managers/InventoryManager.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.managers
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
emu.grasscutter.data.GenshinData
;
import
emu.grasscutter.data.common.ItemParamData
;
import
emu.grasscutter.data.custom.OpenConfigEntry
;
import
emu.grasscutter.data.def.AvatarPromoteData
;
import
emu.grasscutter.data.def.AvatarSkillData
;
import
emu.grasscutter.data.def.AvatarSkillDepotData
;
import
emu.grasscutter.data.def.WeaponPromoteData
;
import
emu.grasscutter.data.def.AvatarSkillDepotData.InherentProudSkillOpens
;
import
emu.grasscutter.data.def.AvatarTalentData
;
import
emu.grasscutter.data.def.ProudSkillData
;
import
emu.grasscutter.game.GenshinPlayer
;
import
emu.grasscutter.game.avatar.GenshinAvatar
;
import
emu.grasscutter.game.inventory.GenshinItem
;
import
emu.grasscutter.game.inventory.ItemType
;
import
emu.grasscutter.game.inventory.MaterialType
;
import
emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam
;
import
emu.grasscutter.net.proto.MaterialInfoOuterClass.MaterialInfo
;
import
emu.grasscutter.server.game.GameServer
;
import
emu.grasscutter.server.packet.send.PacketAbilityChangeNotify
;
import
emu.grasscutter.server.packet.send.PacketAvatarPromoteRsp
;
import
emu.grasscutter.server.packet.send.PacketAvatarPropNotify
;
import
emu.grasscutter.server.packet.send.PacketAvatarSkillChangeNotify
;
import
emu.grasscutter.server.packet.send.PacketAvatarSkillUpgradeRsp
;
import
emu.grasscutter.server.packet.send.PacketAvatarUnlockTalentNotify
;
import
emu.grasscutter.server.packet.send.PacketAvatarUpgradeRsp
;
import
emu.grasscutter.server.packet.send.PacketDestroyMaterialRsp
;
import
emu.grasscutter.server.packet.send.PacketProudSkillChangeNotify
;
import
emu.grasscutter.server.packet.send.PacketProudSkillExtraLevelNotify
;
import
emu.grasscutter.server.packet.send.PacketReliquaryUpgradeRsp
;
import
emu.grasscutter.server.packet.send.PacketSetEquipLockStateRsp
;
import
emu.grasscutter.server.packet.send.PacketStoreItemChangeNotify
;
import
emu.grasscutter.server.packet.send.PacketUnlockAvatarTalentRsp
;
import
emu.grasscutter.server.packet.send.PacketWeaponAwakenRsp
;
import
emu.grasscutter.server.packet.send.PacketWeaponPromoteRsp
;
import
emu.grasscutter.server.packet.send.PacketWeaponUpgradeRsp
;
import
emu.grasscutter.utils.Utils
;
import
it.unimi.dsi.fastutil.ints.Int2IntMap
;
import
it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap
;
public
class
InventoryManager
{
private
final
GameServer
server
;
private
final
static
int
RELIC_MATERIAL_1
=
105002
;
// Sanctifying Unction
private
final
static
int
RELIC_MATERIAL_2
=
105003
;
// Sanctifying Essence
private
final
static
int
WEAPON_ORE_1
=
104011
;
// Enhancement Ore
private
final
static
int
WEAPON_ORE_2
=
104012
;
// Fine Enhancement Ore
private
final
static
int
WEAPON_ORE_3
=
104013
;
// Mystic Enhancement Ore
private
final
static
int
WEAPON_ORE_EXP_1
=
400
;
// Enhancement Ore
private
final
static
int
WEAPON_ORE_EXP_2
=
2000
;
// Fine Enhancement Ore
private
final
static
int
WEAPON_ORE_EXP_3
=
10000
;
// Mystic Enhancement Ore
private
final
static
int
AVATAR_BOOK_1
=
104001
;
// Wanderer's Advice
private
final
static
int
AVATAR_BOOK_2
=
104002
;
// Adventurer's Experience
private
final
static
int
AVATAR_BOOK_3
=
104003
;
// Hero's Wit
private
final
static
int
AVATAR_BOOK_EXP_1
=
1000
;
// Wanderer's Advice
private
final
static
int
AVATAR_BOOK_EXP_2
=
5000
;
// Adventurer's Experience
private
final
static
int
AVATAR_BOOK_EXP_3
=
20000
;
// Hero's Wit
public
InventoryManager
(
GameServer
server
)
{
this
.
server
=
server
;
}
public
GameServer
getServer
()
{
return
server
;
}
public
void
lockEquip
(
GenshinPlayer
player
,
long
targetEquipGuid
,
boolean
isLocked
)
{
GenshinItem
equip
=
player
.
getInventory
().
getItemByGuid
(
targetEquipGuid
);
if
(
equip
==
null
||
!
equip
.
getItemData
().
isEquip
())
{
return
;
}
equip
.
setLocked
(
isLocked
);
equip
.
save
();
player
.
sendPacket
(
new
PacketStoreItemChangeNotify
(
equip
));
player
.
sendPacket
(
new
PacketSetEquipLockStateRsp
(
equip
));
}
public
void
upgradeRelic
(
GenshinPlayer
player
,
long
targetGuid
,
List
<
Long
>
foodRelicList
,
List
<
ItemParam
>
list
)
{
GenshinItem
relic
=
player
.
getInventory
().
getItemByGuid
(
targetGuid
);
if
(
relic
==
null
||
relic
.
getItemType
()
!=
ItemType
.
ITEM_RELIQUARY
)
{
return
;
}
int
moraCost
=
0
;
int
expGain
=
0
;
for
(
long
guid
:
foodRelicList
)
{
// Add to delete queue
GenshinItem
food
=
player
.
getInventory
().
getItemByGuid
(
guid
);
if
(
food
==
null
||
!
food
.
isDestroyable
())
{
continue
;
}
// Calculate mora cost
moraCost
+=
food
.
getItemData
().
getBaseConvExp
();
expGain
+=
food
.
getItemData
().
getBaseConvExp
();
// Feeding artifact with exp already
if
(
food
.
getTotalExp
()
>
0
)
{
expGain
+=
(
int
)
Math
.
floor
(
food
.
getTotalExp
()
*
.
8
f
);
}
}
for
(
ItemParam
itemParam
:
list
)
{
GenshinItem
food
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
itemParam
.
getItemId
());
if
(
food
==
null
||
food
.
getItemData
().
getMaterialType
()
!=
MaterialType
.
MATERIAL_RELIQUARY_MATERIAL
)
{
continue
;
}
int
amount
=
Math
.
min
(
food
.
getCount
(),
itemParam
.
getCount
());
int
gain
=
0
;
if
(
food
.
getItemId
()
==
RELIC_MATERIAL_2
)
{
gain
=
10000
*
amount
;
}
else
if
(
food
.
getItemId
()
==
RELIC_MATERIAL_1
)
{
gain
=
2500
*
amount
;
}
expGain
+=
gain
;
moraCost
+=
gain
;
}
// Make sure exp gain is valid
if
(
expGain
<=
0
)
{
return
;
}
// Check mora
if
(
player
.
getMora
()
<
moraCost
)
{
return
;
}
player
.
setMora
(
player
.
getMora
()
-
moraCost
);
// Consume food items
for
(
long
guid
:
foodRelicList
)
{
GenshinItem
food
=
player
.
getInventory
().
getItemByGuid
(
guid
);
if
(
food
==
null
||
!
food
.
isDestroyable
())
{
continue
;
}
player
.
getInventory
().
removeItem
(
food
);
}
for
(
ItemParam
itemParam
:
list
)
{
GenshinItem
food
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
itemParam
.
getItemId
());
if
(
food
==
null
||
food
.
getItemData
().
getMaterialType
()
!=
MaterialType
.
MATERIAL_RELIQUARY_MATERIAL
)
{
continue
;
}
int
amount
=
Math
.
min
(
food
.
getCount
(),
itemParam
.
getCount
());
player
.
getInventory
().
removeItem
(
food
,
amount
);
}
// Implement random rate boost
int
rate
=
1
;
int
boost
=
Utils
.
randomRange
(
1
,
100
);
if
(
boost
==
100
)
{
rate
=
5
;
}
else
if
(
boost
<=
9
)
{
rate
=
2
;
}
expGain
*=
rate
;
// Now we upgrade
int
level
=
relic
.
getLevel
();
int
oldLevel
=
level
;
int
exp
=
relic
.
getExp
();
int
totalExp
=
relic
.
getTotalExp
();
int
reqExp
=
GenshinData
.
getRelicExpRequired
(
relic
.
getItemData
().
getRankLevel
(),
level
);
int
upgrades
=
0
;
List
<
Integer
>
oldAppendPropIdList
=
relic
.
getAppendPropIdList
();
while
(
expGain
>
0
&&
reqExp
>
0
&&
level
<
relic
.
getItemData
().
getMaxLevel
())
{
// Do calculations
int
toGain
=
Math
.
min
(
expGain
,
reqExp
-
exp
);
exp
+=
toGain
;
totalExp
+=
toGain
;
expGain
-=
toGain
;
// Level up
if
(
exp
>=
reqExp
)
{
// Exp
exp
=
0
;
level
+=
1
;
// On relic levelup
if
(
relic
.
getItemData
().
getAddPropLevelSet
()
!=
null
&&
relic
.
getItemData
().
getAddPropLevelSet
().
contains
(
level
))
{
upgrades
+=
1
;
}
// Set req exp
reqExp
=
GenshinData
.
getRelicExpRequired
(
relic
.
getItemData
().
getRankLevel
(),
level
);
}
}
if
(
upgrades
>
0
)
{
oldAppendPropIdList
=
new
ArrayList
<>(
relic
.
getAppendPropIdList
());
while
(
upgrades
>
0
)
{
relic
.
addAppendProp
();
upgrades
-=
1
;
}
}
// Save
relic
.
setLevel
(
level
);
relic
.
setExp
(
exp
);
relic
.
setTotalExp
(
totalExp
);
relic
.
save
();
// Avatar
if
(
oldLevel
!=
level
)
{
GenshinAvatar
avatar
=
relic
.
getEquipCharacter
()
>
0
?
player
.
getAvatars
().
getAvatarById
(
relic
.
getEquipCharacter
())
:
null
;
if
(
avatar
!=
null
)
{
avatar
.
recalcStats
();
}
}
// Packet
player
.
sendPacket
(
new
PacketStoreItemChangeNotify
(
relic
));
player
.
sendPacket
(
new
PacketReliquaryUpgradeRsp
(
relic
,
rate
,
oldLevel
,
oldAppendPropIdList
));
}
public
List
<
ItemParam
>
calcWeaponUpgradeReturnItems
(
GenshinPlayer
player
,
long
targetGuid
,
List
<
Long
>
foodWeaponGuidList
,
List
<
ItemParam
>
itemParamList
)
{
GenshinItem
weapon
=
player
.
getInventory
().
getItemByGuid
(
targetGuid
);
// Sanity checks
if
(
weapon
==
null
||
weapon
.
getItemType
()
!=
ItemType
.
ITEM_WEAPON
)
{
return
null
;
}
WeaponPromoteData
promoteData
=
GenshinData
.
getWeaponPromoteData
(
weapon
.
getItemData
().
getWeaponPromoteId
(),
weapon
.
getPromoteLevel
());
if
(
promoteData
==
null
)
{
return
null
;
}
// Get exp gain
int
expGain
=
0
;
for
(
long
guid
:
foodWeaponGuidList
)
{
GenshinItem
food
=
player
.
getInventory
().
getItemByGuid
(
guid
);
if
(
food
==
null
)
{
continue
;
}
expGain
+=
food
.
getItemData
().
getWeaponBaseExp
();
if
(
food
.
getTotalExp
()
>
0
)
{
expGain
+=
(
int
)
Math
.
floor
(
food
.
getTotalExp
()
*
.
8
f
);
}
}
for
(
ItemParam
param
:
itemParamList
)
{
GenshinItem
food
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
param
.
getItemId
());
if
(
food
==
null
||
food
.
getItemData
().
getMaterialType
()
!=
MaterialType
.
MATERIAL_WEAPON_EXP_STONE
)
{
continue
;
}
int
amount
=
Math
.
min
(
param
.
getCount
(),
food
.
getCount
());
if
(
food
.
getItemId
()
==
WEAPON_ORE_3
)
{
expGain
+=
10000
*
amount
;
}
else
if
(
food
.
getItemId
()
==
WEAPON_ORE_2
)
{
expGain
+=
2000
*
amount
;
}
else
if
(
food
.
getItemId
()
==
WEAPON_ORE_1
)
{
expGain
+=
400
*
amount
;
}
}
// Try
int
maxLevel
=
promoteData
.
getUnlockMaxLevel
();
int
level
=
weapon
.
getLevel
();
int
exp
=
weapon
.
getExp
();
int
reqExp
=
GenshinData
.
getWeaponExpRequired
(
weapon
.
getItemData
().
getRankLevel
(),
level
);
while
(
expGain
>
0
&&
reqExp
>
0
&&
level
<
maxLevel
)
{
// Do calculations
int
toGain
=
Math
.
min
(
expGain
,
reqExp
-
exp
);
exp
+=
toGain
;
expGain
-=
toGain
;
// Level up
if
(
exp
>=
reqExp
)
{
// Exp
exp
=
0
;
level
+=
1
;
// Set req exp
reqExp
=
GenshinData
.
getWeaponExpRequired
(
weapon
.
getItemData
().
getRankLevel
(),
level
);
}
}
return
getLeftoverOres
(
expGain
);
}
public
void
upgradeWeapon
(
GenshinPlayer
player
,
long
targetGuid
,
List
<
Long
>
foodWeaponGuidList
,
List
<
ItemParam
>
itemParamList
)
{
GenshinItem
weapon
=
player
.
getInventory
().
getItemByGuid
(
targetGuid
);
// Sanity checks
if
(
weapon
==
null
||
weapon
.
getItemType
()
!=
ItemType
.
ITEM_WEAPON
)
{
return
;
}
WeaponPromoteData
promoteData
=
GenshinData
.
getWeaponPromoteData
(
weapon
.
getItemData
().
getWeaponPromoteId
(),
weapon
.
getPromoteLevel
());
if
(
promoteData
==
null
)
{
return
;
}
// Get exp gain
int
expGain
=
0
,
moraCost
=
0
;
for
(
long
guid
:
foodWeaponGuidList
)
{
GenshinItem
food
=
player
.
getInventory
().
getItemByGuid
(
guid
);
if
(
food
==
null
||
!
food
.
isDestroyable
())
{
continue
;
}
expGain
+=
food
.
getItemData
().
getWeaponBaseExp
();
moraCost
+=
(
int
)
Math
.
floor
(
food
.
getItemData
().
getWeaponBaseExp
()
*
.
1
f
);
if
(
food
.
getTotalExp
()
>
0
)
{
expGain
+=
(
int
)
Math
.
floor
(
food
.
getTotalExp
()
*
.
8
f
);
}
}
for
(
ItemParam
param
:
itemParamList
)
{
GenshinItem
food
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
param
.
getItemId
());
if
(
food
==
null
||
food
.
getItemData
().
getMaterialType
()
!=
MaterialType
.
MATERIAL_WEAPON_EXP_STONE
)
{
continue
;
}
int
amount
=
Math
.
min
(
param
.
getCount
(),
food
.
getCount
());
int
gain
=
0
;
if
(
food
.
getItemId
()
==
WEAPON_ORE_3
)
{
gain
=
10000
*
amount
;
}
else
if
(
food
.
getItemId
()
==
WEAPON_ORE_2
)
{
gain
=
2000
*
amount
;
}
else
if
(
food
.
getItemId
()
==
WEAPON_ORE_1
)
{
gain
=
400
*
amount
;
}
expGain
+=
gain
;
moraCost
+=
(
int
)
Math
.
floor
(
gain
*
.
1
f
);
}
// Make sure exp gain is valid
if
(
expGain
<=
0
)
{
return
;
}
// Mora check
if
(
player
.
getMora
()
>=
moraCost
)
{
player
.
setMora
(
player
.
getMora
()
-
moraCost
);
}
else
{
return
;
}
// Consume weapon/items used to feed
for
(
long
guid
:
foodWeaponGuidList
)
{
GenshinItem
food
=
player
.
getInventory
().
getItemByGuid
(
guid
);
if
(
food
==
null
||
!
food
.
isDestroyable
())
{
continue
;
}
player
.
getInventory
().
removeItem
(
food
);
}
for
(
ItemParam
param
:
itemParamList
)
{
GenshinItem
food
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
param
.
getItemId
());
if
(
food
==
null
||
food
.
getItemData
().
getMaterialType
()
!=
MaterialType
.
MATERIAL_WEAPON_EXP_STONE
)
{
continue
;
}
int
amount
=
Math
.
min
(
param
.
getCount
(),
food
.
getCount
());
player
.
getInventory
().
removeItem
(
food
,
amount
);
}
// Level up
int
maxLevel
=
promoteData
.
getUnlockMaxLevel
();
int
level
=
weapon
.
getLevel
();
int
oldLevel
=
level
;
int
exp
=
weapon
.
getExp
();
int
totalExp
=
weapon
.
getTotalExp
();
int
reqExp
=
GenshinData
.
getWeaponExpRequired
(
weapon
.
getItemData
().
getRankLevel
(),
level
);
while
(
expGain
>
0
&&
reqExp
>
0
&&
level
<
maxLevel
)
{
// Do calculations
int
toGain
=
Math
.
min
(
expGain
,
reqExp
-
exp
);
exp
+=
toGain
;
totalExp
+=
toGain
;
expGain
-=
toGain
;
// Level up
if
(
exp
>=
reqExp
)
{
// Exp
exp
=
0
;
level
+=
1
;
// Set req exp
reqExp
=
GenshinData
.
getWeaponExpRequired
(
weapon
.
getItemData
().
getRankLevel
(),
level
);
}
}
List
<
ItemParam
>
leftovers
=
getLeftoverOres
(
expGain
);
player
.
getInventory
().
addItemParams
(
leftovers
);
weapon
.
setLevel
(
level
);
weapon
.
setExp
(
exp
);
weapon
.
setTotalExp
(
totalExp
);
weapon
.
save
();
// Avatar
if
(
oldLevel
!=
level
)
{
GenshinAvatar
avatar
=
weapon
.
getEquipCharacter
()
>
0
?
player
.
getAvatars
().
getAvatarById
(
weapon
.
getEquipCharacter
())
:
null
;
if
(
avatar
!=
null
)
{
avatar
.
recalcStats
();
}
}
// Packets
player
.
sendPacket
(
new
PacketStoreItemChangeNotify
(
weapon
));
player
.
sendPacket
(
new
PacketWeaponUpgradeRsp
(
weapon
,
oldLevel
,
leftovers
));
}
private
List
<
ItemParam
>
getLeftoverOres
(
float
leftover
)
{
List
<
ItemParam
>
leftoverOreList
=
new
ArrayList
<>(
3
);
if
(
leftover
<
WEAPON_ORE_EXP_1
)
{
return
leftoverOreList
;
}
// Get leftovers
int
ore3
=
(
int
)
Math
.
floor
(
leftover
/
WEAPON_ORE_EXP_3
);
leftover
=
leftover
%
WEAPON_ORE_EXP_3
;
int
ore2
=
(
int
)
Math
.
floor
(
leftover
/
WEAPON_ORE_EXP_2
);
leftover
=
leftover
%
WEAPON_ORE_EXP_2
;
int
ore1
=
(
int
)
Math
.
floor
(
leftover
/
WEAPON_ORE_EXP_1
);
if
(
ore3
>
0
)
{
leftoverOreList
.
add
(
ItemParam
.
newBuilder
().
setItemId
(
WEAPON_ORE_3
).
setCount
(
ore3
).
build
());
}
if
(
ore2
>
0
)
{
leftoverOreList
.
add
(
ItemParam
.
newBuilder
().
setItemId
(
WEAPON_ORE_2
).
setCount
(
ore2
).
build
());
}
if
(
ore1
>
0
)
{
leftoverOreList
.
add
(
ItemParam
.
newBuilder
().
setItemId
(
WEAPON_ORE_1
).
setCount
(
ore1
).
build
());
}
return
leftoverOreList
;
}
public
void
refineWeapon
(
GenshinPlayer
player
,
long
targetGuid
,
long
feedGuid
)
{
GenshinItem
weapon
=
player
.
getInventory
().
getItemByGuid
(
targetGuid
);
GenshinItem
feed
=
player
.
getInventory
().
getItemByGuid
(
feedGuid
);
// Sanity checks
if
(
weapon
==
null
||
feed
==
null
||
!
feed
.
isDestroyable
())
{
return
;
}
if
(
weapon
.
getItemType
()
!=
ItemType
.
ITEM_WEAPON
||
weapon
.
getItemId
()
!=
feed
.
getItemId
())
{
return
;
}
if
(
weapon
.
getRefinement
()
>=
4
||
weapon
.
getAffixes
()
==
null
||
weapon
.
getAffixes
().
size
()
==
0
)
{
return
;
}
// Calculate
int
oldRefineLevel
=
weapon
.
getRefinement
();
int
targetRefineLevel
=
Math
.
min
(
oldRefineLevel
+
feed
.
getRefinement
()
+
1
,
4
);
int
moraCost
=
0
;
try
{
moraCost
=
weapon
.
getItemData
().
getAwakenCosts
()[
weapon
.
getRefinement
()];
}
catch
(
Exception
e
)
{
return
;
}
// Mora check
if
(
player
.
getMora
()
>=
moraCost
)
{
player
.
setMora
(
player
.
getMora
()
-
moraCost
);
}
else
{
return
;
}
// Consume weapon
player
.
getInventory
().
removeItem
(
feed
);
// Get
weapon
.
setRefinement
(
targetRefineLevel
);
weapon
.
save
();
// Avatar
GenshinAvatar
avatar
=
weapon
.
getEquipCharacter
()
>
0
?
player
.
getAvatars
().
getAvatarById
(
weapon
.
getEquipCharacter
())
:
null
;
if
(
avatar
!=
null
)
{
avatar
.
recalcStats
();
}
// Packets
player
.
sendPacket
(
new
PacketStoreItemChangeNotify
(
weapon
));
player
.
sendPacket
(
new
PacketWeaponAwakenRsp
(
avatar
,
weapon
,
feed
,
oldRefineLevel
));
}
public
void
promoteWeapon
(
GenshinPlayer
player
,
long
targetGuid
)
{
GenshinItem
weapon
=
player
.
getInventory
().
getItemByGuid
(
targetGuid
);
if
(
weapon
==
null
||
weapon
.
getItemType
()
!=
ItemType
.
ITEM_WEAPON
)
{
return
;
}
int
nextPromoteLevel
=
weapon
.
getPromoteLevel
()
+
1
;
WeaponPromoteData
currentPromoteData
=
GenshinData
.
getWeaponPromoteData
(
weapon
.
getItemData
().
getWeaponPromoteId
(),
weapon
.
getPromoteLevel
());
WeaponPromoteData
nextPromoteData
=
GenshinData
.
getWeaponPromoteData
(
weapon
.
getItemData
().
getWeaponPromoteId
(),
nextPromoteLevel
);
if
(
currentPromoteData
==
null
||
nextPromoteData
==
null
)
{
return
;
}
// Level check
if
(
weapon
.
getLevel
()
!=
currentPromoteData
.
getUnlockMaxLevel
())
{
return
;
}
// Make sure player has promote items
for
(
ItemParamData
cost
:
nextPromoteData
.
getCostItems
())
{
GenshinItem
feedItem
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
cost
.
getId
());
if
(
feedItem
==
null
||
feedItem
.
getCount
()
<
cost
.
getCount
())
{
return
;
}
}
// Mora check
if
(
player
.
getMora
()
>=
nextPromoteData
.
getCoinCost
())
{
player
.
setMora
(
player
.
getMora
()
-
nextPromoteData
.
getCoinCost
());
}
else
{
return
;
}
// Consume promote filler items
for
(
ItemParamData
cost
:
nextPromoteData
.
getCostItems
())
{
GenshinItem
feedItem
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
cost
.
getId
());
player
.
getInventory
().
removeItem
(
feedItem
,
cost
.
getCount
());
}
int
oldPromoteLevel
=
weapon
.
getPromoteLevel
();
weapon
.
setPromoteLevel
(
nextPromoteLevel
);
weapon
.
save
();
// Avatar
GenshinAvatar
avatar
=
weapon
.
getEquipCharacter
()
>
0
?
player
.
getAvatars
().
getAvatarById
(
weapon
.
getEquipCharacter
())
:
null
;
if
(
avatar
!=
null
)
{
avatar
.
recalcStats
();
}
// Packets
player
.
sendPacket
(
new
PacketStoreItemChangeNotify
(
weapon
));
player
.
sendPacket
(
new
PacketWeaponPromoteRsp
(
weapon
,
oldPromoteLevel
));
}
public
void
promoteAvatar
(
GenshinPlayer
player
,
long
guid
)
{
GenshinAvatar
avatar
=
player
.
getAvatars
().
getAvatarByGuid
(
guid
);
// Sanity checks
if
(
avatar
==
null
)
{
return
;
}
int
nextPromoteLevel
=
avatar
.
getPromoteLevel
()
+
1
;
AvatarPromoteData
currentPromoteData
=
GenshinData
.
getAvatarPromoteData
(
avatar
.
getAvatarData
().
getAvatarPromoteId
(),
avatar
.
getPromoteLevel
());
AvatarPromoteData
nextPromoteData
=
GenshinData
.
getAvatarPromoteData
(
avatar
.
getAvatarData
().
getAvatarPromoteId
(),
nextPromoteLevel
);
if
(
currentPromoteData
==
null
||
nextPromoteData
==
null
)
{
return
;
}
// Level check
if
(
avatar
.
getLevel
()
!=
currentPromoteData
.
getUnlockMaxLevel
())
{
return
;
}
// Make sure player has cost items
for
(
ItemParamData
cost
:
nextPromoteData
.
getCostItems
())
{
GenshinItem
feedItem
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
cost
.
getId
());
if
(
feedItem
==
null
||
feedItem
.
getCount
()
<
cost
.
getCount
())
{
return
;
}
}
// Mora check
if
(
player
.
getMora
()
>=
nextPromoteData
.
getCoinCost
())
{
player
.
setMora
(
player
.
getMora
()
-
nextPromoteData
.
getCoinCost
());
}
else
{
return
;
}
// Consume promote filler items
for
(
ItemParamData
cost
:
nextPromoteData
.
getCostItems
())
{
GenshinItem
feedItem
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
cost
.
getId
());
player
.
getInventory
().
removeItem
(
feedItem
,
cost
.
getCount
());
}
// Update promote level
avatar
.
setPromoteLevel
(
nextPromoteLevel
);
// Update proud skills
AvatarSkillDepotData
skillDepot
=
GenshinData
.
getAvatarSkillDepotDataMap
().
get
(
avatar
.
getSkillDepotId
());
boolean
hasAddedProudSkill
=
false
;
if
(
skillDepot
!=
null
&&
skillDepot
.
getInherentProudSkillOpens
()
!=
null
)
{
for
(
InherentProudSkillOpens
openData
:
skillDepot
.
getInherentProudSkillOpens
())
{
if
(
openData
.
getProudSkillGroupId
()
==
0
)
{
continue
;
}
if
(
openData
.
getNeedAvatarPromoteLevel
()
==
avatar
.
getPromoteLevel
())
{
int
proudSkillId
=
(
openData
.
getProudSkillGroupId
()
*
100
)
+
1
;
if
(
GenshinData
.
getProudSkillDataMap
().
containsKey
(
proudSkillId
))
{
hasAddedProudSkill
=
true
;
avatar
.
getProudSkillList
().
add
(
proudSkillId
);
player
.
sendPacket
(
new
PacketProudSkillChangeNotify
(
avatar
));
}
}
}
}
// Racalc stats and save avatar
avatar
.
recalcStats
();
avatar
.
save
();
// Resend ability embryos if proud skill has been added
if
(
hasAddedProudSkill
&&
avatar
.
getAsEntity
()
!=
null
)
{
player
.
sendPacket
(
new
PacketAbilityChangeNotify
(
avatar
.
getAsEntity
()));
}
// TODO Send entity prop update packet to world
// Packets
player
.
sendPacket
(
new
PacketAvatarPropNotify
(
avatar
));
player
.
sendPacket
(
new
PacketAvatarPromoteRsp
(
avatar
));
}
public
void
upgradeAvatar
(
GenshinPlayer
player
,
long
guid
,
int
itemId
,
int
count
)
{
GenshinAvatar
avatar
=
player
.
getAvatars
().
getAvatarByGuid
(
guid
);
// Sanity checks
if
(
avatar
==
null
)
{
return
;
}
AvatarPromoteData
promoteData
=
GenshinData
.
getAvatarPromoteData
(
avatar
.
getAvatarData
().
getAvatarPromoteId
(),
avatar
.
getPromoteLevel
());
if
(
promoteData
==
null
)
{
return
;
}
GenshinItem
feedItem
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
itemId
);
if
(
feedItem
==
null
||
feedItem
.
getItemData
().
getMaterialType
()
!=
MaterialType
.
MATERIAL_EXP_FRUIT
||
feedItem
.
getCount
()
<
count
)
{
return
;
}
// Calc exp
int
expGain
=
0
,
moraCost
=
0
;
// TODO clean up
if
(
itemId
==
AVATAR_BOOK_3
)
{
expGain
=
AVATAR_BOOK_EXP_3
*
count
;
}
else
if
(
itemId
==
AVATAR_BOOK_2
)
{
expGain
=
AVATAR_BOOK_EXP_2
*
count
;
}
else
if
(
itemId
==
AVATAR_BOOK_1
)
{
expGain
=
AVATAR_BOOK_EXP_1
*
count
;
}
moraCost
=
(
int
)
Math
.
floor
(
expGain
*
.
2
f
);
// Mora check
if
(
player
.
getMora
()
>=
moraCost
)
{
player
.
setMora
(
player
.
getMora
()
-
moraCost
);
}
else
{
return
;
}
// Consume items
player
.
getInventory
().
removeItem
(
feedItem
,
count
);
// Level up
int
maxLevel
=
promoteData
.
getUnlockMaxLevel
();
int
level
=
avatar
.
getLevel
();
int
oldLevel
=
level
;
int
exp
=
avatar
.
getExp
();
int
reqExp
=
GenshinData
.
getAvatarLevelExpRequired
(
level
);
while
(
expGain
>
0
&&
reqExp
>
0
&&
level
<
maxLevel
)
{
// Do calculations
int
toGain
=
Math
.
min
(
expGain
,
reqExp
-
exp
);
exp
+=
toGain
;
expGain
-=
toGain
;
// Level up
if
(
exp
>=
reqExp
)
{
// Exp
exp
=
0
;
level
+=
1
;
// Set req exp
reqExp
=
GenshinData
.
getAvatarLevelExpRequired
(
level
);
}
}
// Old map for packet
Map
<
Integer
,
Float
>
oldPropMap
=
avatar
.
getFightProperties
();
if
(
oldLevel
!=
level
)
{
// Deep copy if level has changed
oldPropMap
=
avatar
.
getFightProperties
().
int2FloatEntrySet
().
stream
().
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
}
// Done
avatar
.
setLevel
(
level
);
avatar
.
setExp
(
exp
);
avatar
.
recalcStats
();
avatar
.
save
();
// TODO Send entity prop update packet to world
// Packets
player
.
sendPacket
(
new
PacketAvatarPropNotify
(
avatar
));
player
.
sendPacket
(
new
PacketAvatarUpgradeRsp
(
avatar
,
oldLevel
,
oldPropMap
));
}
public
void
upgradeAvatarSkill
(
GenshinPlayer
player
,
long
guid
,
int
skillId
)
{
// Sanity checks
GenshinAvatar
avatar
=
player
.
getAvatars
().
getAvatarByGuid
(
guid
);
if
(
avatar
==
null
)
{
return
;
}
// Make sure avatar has skill
if
(!
avatar
.
getSkillLevelMap
().
containsKey
(
skillId
))
{
return
;
}
AvatarSkillData
skillData
=
GenshinData
.
getAvatarSkillDataMap
().
get
(
skillId
);
if
(
skillData
==
null
)
{
return
;
}
// Get data for next skill level
int
currentLevel
=
avatar
.
getSkillLevelMap
().
get
(
skillId
);
int
nextLevel
=
currentLevel
+
1
;
int
proudSkillId
=
(
skillData
.
getProudSkillGroupId
()
*
100
)
+
nextLevel
;
// Capped at level 10 talent
if
(
nextLevel
>
10
)
{
return
;
}
// Proud skill data
ProudSkillData
proudSkill
=
GenshinData
.
getProudSkillDataMap
().
get
(
proudSkillId
);
if
(
proudSkill
==
null
)
{
return
;
}
// Make sure break level is correct
if
(
avatar
.
getPromoteLevel
()
<
proudSkill
.
getBreakLevel
())
{
return
;
}
// Make sure player has cost items
for
(
ItemParamData
cost
:
proudSkill
.
getCostItems
())
{
if
(
cost
.
getId
()
==
0
)
{
continue
;
}
GenshinItem
feedItem
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
cost
.
getId
());
if
(
feedItem
==
null
||
feedItem
.
getCount
()
<
cost
.
getCount
())
{
return
;
}
}
// Mora check
if
(
player
.
getMora
()
>=
proudSkill
.
getCoinCost
())
{
player
.
setMora
(
player
.
getMora
()
-
proudSkill
.
getCoinCost
());
}
else
{
return
;
}
// Consume promote filler items
for
(
ItemParamData
cost
:
proudSkill
.
getCostItems
())
{
if
(
cost
.
getId
()
==
0
)
{
continue
;
}
GenshinItem
feedItem
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
cost
.
getId
());
player
.
getInventory
().
removeItem
(
feedItem
,
cost
.
getCount
());
}
// Upgrade skill
avatar
.
getSkillLevelMap
().
put
(
skillId
,
nextLevel
);
avatar
.
save
();
// Packet
player
.
sendPacket
(
new
PacketAvatarSkillChangeNotify
(
avatar
,
skillId
,
currentLevel
,
nextLevel
));
player
.
sendPacket
(
new
PacketAvatarSkillUpgradeRsp
(
avatar
,
skillId
,
currentLevel
,
nextLevel
));
}
public
void
unlockAvatarConstellation
(
GenshinPlayer
player
,
long
guid
)
{
// Sanity checks
GenshinAvatar
avatar
=
player
.
getAvatars
().
getAvatarByGuid
(
guid
);
if
(
avatar
==
null
)
{
return
;
}
// Get talent
int
currentTalentLevel
=
avatar
.
getCoreProudSkillLevel
();
int
nextTalentId
=
((
avatar
.
getAvatarId
()
%
10000000
)
*
10
)
+
currentTalentLevel
+
1
;
AvatarTalentData
talentData
=
GenshinData
.
getAvatarTalentDataMap
().
get
(
nextTalentId
);
if
(
talentData
==
null
)
{
return
;
}
GenshinItem
costItem
=
player
.
getInventory
().
getInventoryTab
(
ItemType
.
ITEM_MATERIAL
).
getItemById
(
talentData
.
getMainCostItemId
());
if
(
costItem
==
null
||
costItem
.
getCount
()
<
talentData
.
getMainCostItemCount
())
{
return
;
}
// Consume item
player
.
getInventory
().
removeItem
(
costItem
,
talentData
.
getMainCostItemCount
());
// Apply + recalc
avatar
.
getTalentIdList
().
add
(
talentData
.
getId
());
avatar
.
setCoreProudSkillLevel
(
currentTalentLevel
+
1
);
avatar
.
recalcStats
();
// Packet
player
.
sendPacket
(
new
PacketAvatarUnlockTalentNotify
(
avatar
,
nextTalentId
));
player
.
sendPacket
(
new
PacketUnlockAvatarTalentRsp
(
avatar
,
nextTalentId
));
// Proud skill bonus map
OpenConfigEntry
entry
=
GenshinData
.
getOpenConfigEntries
().
get
(
talentData
.
getOpenConfig
());
if
(
entry
!=
null
&&
entry
.
getExtraTalentIndex
()
>
0
)
{
avatar
.
recalcProudSkillBonusMap
();
player
.
sendPacket
(
new
PacketProudSkillExtraLevelNotify
(
avatar
,
entry
.
getExtraTalentIndex
()));
}
// Resend ability embryos
if
(
avatar
.
getAsEntity
()
!=
null
)
{
player
.
sendPacket
(
new
PacketAbilityChangeNotify
(
avatar
.
getAsEntity
()));
}
// Save avatar
avatar
.
save
();
}
public
void
destroyMaterial
(
GenshinPlayer
player
,
List
<
MaterialInfo
>
list
)
{
// Return materials
Int2IntOpenHashMap
returnMaterialMap
=
new
Int2IntOpenHashMap
();
for
(
MaterialInfo
info
:
list
)
{
// Sanity check
if
(
info
.
getCount
()
<=
0
)
{
continue
;
}
GenshinItem
item
=
player
.
getInventory
().
getItemByGuid
(
info
.
getGuid
());
if
(
item
==
null
||
!
item
.
isDestroyable
())
{
continue
;
}
// Remove
int
removeAmount
=
Math
.
min
(
info
.
getCount
(),
item
.
getCount
());
player
.
getInventory
().
removeItem
(
item
,
removeAmount
);
// Delete material return items
if
(
item
.
getItemData
().
getDestroyReturnMaterial
().
length
>
0
)
{
for
(
int
i
=
0
;
i
<
item
.
getItemData
().
getDestroyReturnMaterial
().
length
;
i
++)
{
returnMaterialMap
.
addTo
(
item
.
getItemData
().
getDestroyReturnMaterial
()[
i
],
item
.
getItemData
().
getDestroyReturnMaterialCount
()[
i
]);
}
}
}
// Give back items
if
(
returnMaterialMap
.
size
()
>
0
)
{
for
(
Int2IntMap
.
Entry
e
:
returnMaterialMap
.
int2IntEntrySet
())
{
player
.
getInventory
().
addItem
(
new
GenshinItem
(
e
.
getIntKey
(),
e
.
getIntValue
()));
}
}
// Packets
player
.
sendPacket
(
new
PacketDestroyMaterialRsp
(
returnMaterialMap
));
}
public
GenshinItem
useItem
(
GenshinPlayer
player
,
long
targetGuid
,
long
itemGuid
,
int
count
)
{
GenshinAvatar
target
=
player
.
getAvatars
().
getAvatarByGuid
(
targetGuid
);
GenshinItem
useItem
=
player
.
getInventory
().
getItemByGuid
(
itemGuid
);
if
(
useItem
==
null
)
{
return
null
;
}
int
used
=
0
;
// Use
switch
(
useItem
.
getItemData
().
getMaterialType
())
{
case
MATERIAL_FOOD:
if
(
useItem
.
getItemData
().
getUseTarget
().
equals
(
"ITEM_USE_TARGET_SPECIFY_DEAD_AVATAR"
))
{
if
(
target
==
null
)
{
break
;
}
used
=
player
.
getTeamManager
().
reviveAvatar
(
target
)
?
1
:
0
;
}
break
;
default
:
break
;
}
if
(
used
>
0
)
{
player
.
getInventory
().
removeItem
(
useItem
,
used
);
return
useItem
;
}
return
null
;
}
}
src/main/java/emu/grasscutter/game/managers/MultiplayerManager.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.managers
;
import
emu.grasscutter.game.CoopRequest
;
import
emu.grasscutter.game.GenshinPlayer
;
import
emu.grasscutter.game.GenshinPlayer.SceneLoadState
;
import
emu.grasscutter.game.props.EnterReason
;
import
emu.grasscutter.net.proto.EnterTypeOuterClass.EnterType
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpReasonOuterClass.PlayerApplyEnterMpReason
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.server.game.GameServer
;
import
emu.grasscutter.server.packet.send.PacketPlayerApplyEnterMpNotify
;
import
emu.grasscutter.server.packet.send.PacketPlayerApplyEnterMpResultNotify
;
import
emu.grasscutter.server.packet.send.PacketPlayerEnterSceneNotify
;
public
class
MultiplayerManager
{
private
final
GameServer
server
;
public
MultiplayerManager
(
GameServer
server
)
{
this
.
server
=
server
;
}
public
GameServer
getServer
()
{
return
server
;
}
public
void
applyEnterMp
(
GenshinPlayer
player
,
int
targetUid
)
{
GenshinPlayer
target
=
getServer
().
getPlayerById
(
targetUid
);
if
(
target
==
null
)
{
player
.
sendPacket
(
new
PacketPlayerApplyEnterMpResultNotify
(
targetUid
,
""
,
false
,
PlayerApplyEnterMpReason
.
PlayerCannotEnterMp
));
return
;
}
// Sanity checks - Dont let player join if already in multiplayer
if
(
player
.
getWorld
().
isMultiplayer
())
{
return
;
}
if
(
target
.
getWorld
().
isDungeon
())
{
player
.
sendPacket
(
new
PacketPlayerApplyEnterMpResultNotify
(
targetUid
,
""
,
false
,
PlayerApplyEnterMpReason
.
SceneCannotEnter
));
return
;
}
// Get request
CoopRequest
request
=
target
.
getCoopRequests
().
get
(
player
.
getId
());
if
(
request
!=
null
&&
!
request
.
isExpired
())
{
// Join request already exists
return
;
}
// Put request in
request
=
new
CoopRequest
(
player
);
target
.
getCoopRequests
().
put
(
player
.
getId
(),
request
);
// Packet
target
.
sendPacket
(
new
PacketPlayerApplyEnterMpNotify
(
player
));
}
public
void
applyEnterMpReply
(
GenshinPlayer
player
,
int
applyUid
,
boolean
isAgreed
)
{
// Checks
CoopRequest
request
=
player
.
getCoopRequests
().
get
(
applyUid
);
if
(
request
==
null
||
request
.
isExpired
())
{
return
;
}
// Remove now that we are handling it
GenshinPlayer
requester
=
request
.
getRequester
();
player
.
getCoopRequests
().
remove
(
applyUid
);
// Sanity checks - Dont let player join if already in multiplayer
if
(
requester
.
getWorld
().
isMultiplayer
())
{
request
.
getRequester
().
sendPacket
(
new
PacketPlayerApplyEnterMpResultNotify
(
player
,
false
,
PlayerApplyEnterMpReason
.
PlayerCannotEnterMp
));
return
;
}
// Response packet
request
.
getRequester
().
sendPacket
(
new
PacketPlayerApplyEnterMpResultNotify
(
player
,
isAgreed
,
PlayerApplyEnterMpReason
.
PlayerJudge
));
// Declined
if
(!
isAgreed
)
{
return
;
}
// Success
if
(!
player
.
getWorld
().
isMultiplayer
())
{
// Player not in multiplayer, create multiplayer world
World
world
=
new
World
(
player
,
true
);
// Add
world
.
addPlayer
(
player
);
// Rejoin packet
player
.
sendPacket
(
new
PacketPlayerEnterSceneNotify
(
player
,
player
,
EnterType
.
EnterSelf
,
EnterReason
.
HostFromSingleToMp
,
player
.
getWorld
().
getSceneId
(),
player
.
getPos
()));
}
// Make requester join
player
.
getWorld
().
addPlayer
(
requester
);
// Packet
requester
.
sendPacket
(
new
PacketPlayerEnterSceneNotify
(
requester
,
player
,
EnterType
.
EnterOther
,
EnterReason
.
TeamJoin
,
player
.
getWorld
().
getSceneId
(),
player
.
getPos
()));
requester
.
getPos
().
set
(
player
.
getPos
());
requester
.
getRotation
().
set
(
player
.
getRotation
());
}
public
boolean
leaveCoop
(
GenshinPlayer
player
)
{
// Make sure player's world is multiplayer
if
(!
player
.
getWorld
().
isMultiplayer
())
{
return
false
;
}
// Make sure everyone's scene is loaded
for
(
GenshinPlayer
p
:
player
.
getWorld
().
getPlayers
())
{
if
(
p
.
getSceneLoadState
()
!=
SceneLoadState
.
LOADED
)
{
return
false
;
}
}
// Create new world for player
World
world
=
new
World
(
player
);
world
.
addPlayer
(
player
);
// Packet
player
.
sendPacket
(
new
PacketPlayerEnterSceneNotify
(
player
,
EnterType
.
EnterSelf
,
EnterReason
.
TeamBack
,
player
.
getWorld
().
getSceneId
(),
player
.
getPos
()));
return
true
;
}
public
boolean
kickPlayer
(
GenshinPlayer
player
,
int
targetUid
)
{
// Make sure player's world is multiplayer and that player is owner
if
(!
player
.
getWorld
().
isMultiplayer
()
||
player
.
getWorld
().
getHost
()
!=
player
)
{
return
false
;
}
// Get victim and sanity checks
GenshinPlayer
victim
=
player
.
getServer
().
getPlayerById
(
targetUid
);
if
(
victim
==
null
||
victim
==
player
)
{
return
false
;
}
// Make sure victim's scene has loaded
if
(
victim
.
getSceneLoadState
()
!=
SceneLoadState
.
LOADED
)
{
return
false
;
}
// Kick
World
world
=
new
World
(
victim
);
world
.
addPlayer
(
victim
);
victim
.
sendPacket
(
new
PacketPlayerEnterSceneNotify
(
victim
,
EnterType
.
EnterSelf
,
EnterReason
.
TeamKick
,
victim
.
getWorld
().
getSceneId
(),
victim
.
getPos
()));
return
true
;
}
}
src/main/java/emu/grasscutter/game/props/ActionReason.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
ActionReason
{
None
(
0
),
QuestItem
(
1
),
QuestReward
(
2
),
Trifle
(
3
),
Shop
(
4
),
PlayerUpgradeReward
(
5
),
AddAvatar
(
6
),
GadgetEnvAnimal
(
7
),
MonsterEnvAnimal
(
8
),
Compound
(
9
),
Cook
(
10
),
Gather
(
11
),
MailAttachment
(
12
),
CityLevelupReturn
(
15
),
CityLevelupReward
(
17
),
AreaExploreReward
(
18
),
UnlockPointReward
(
19
),
DungeonFirstPass
(
20
),
DungeonPass
(
21
),
ChangeElemType
(
23
),
FetterOpen
(
25
),
DailyTaskScore
(
26
),
DailyTaskHost
(
27
),
RandTaskHost
(
28
),
Expedition
(
29
),
Gacha
(
30
),
Combine
(
31
),
RandTaskGuest
(
32
),
DailyTaskGuest
(
33
),
ForgeOutput
(
34
),
ForgeReturn
(
35
),
InitAvatar
(
36
),
MonsterDie
(
37
),
Gm
(
38
),
OpenChest
(
39
),
GadgetDie
(
40
),
MonsterChangeHp
(
41
),
SubfieldDrop
(
42
),
PushTipsReward
(
43
),
ActivityMonsterDrop
(
44
),
ActivityGather
(
45
),
ActivitySubfieldDrop
(
46
),
TowerScheduleReward
(
47
),
TowerFloorStarReward
(
48
),
TowerFirstPassReward
(
49
),
TowerDailyReward
(
50
),
HitClientTrivialEntity
(
51
),
OpenWorldBossChest
(
52
),
MaterialDeleteReturn
(
53
),
SignInReward
(
54
),
OpenBlossomChest
(
55
),
Recharge
(
56
),
BonusActivityReward
(
57
),
TowerCommemorativeReward
(
58
),
TowerSkipFloorReward
(
59
),
RechargeBonus
(
60
),
RechargeCard
(
61
),
RechargeCardDaily
(
62
),
RechargeCardReplace
(
63
),
RechargeCardReplaceFree
(
64
),
RechargePlayReplace
(
65
),
MpPlayTakeReward
(
66
),
ActivityWatcher
(
67
),
SalesmanDeliverItem
(
68
),
SalesmanReward
(
69
),
Rebate
(
70
),
McoinExchangeHcoin
(
71
),
DailyTaskExchangeLegendaryKey
(
72
),
UnlockPersonLine
(
73
),
FetterLevelReward
(
74
),
BuyResin
(
75
),
RechargePackage
(
76
),
DeliveryDailyReward
(
77
),
CityReputationLevel
(
78
),
CityReputationQuest
(
79
),
CityReputationRequest
(
80
),
CityReputationExplore
(
81
),
OffergingLevel
(
82
),
RoutineHost
(
83
),
RoutineGuest
(
84
),
TreasureMapSpotToken
(
89
),
TreasureMapBonusLevelReward
(
90
),
TreasureMapMpReward
(
91
),
Convert
(
92
),
OverflowTransform
(
93
),
ActivityAvatarSelectionReward
(
96
),
ActivityWatcherBatch
(
97
),
HitTreeDrop
(
98
),
GetHomeLevelupReward
(
99
),
HomeDefaultFurniture
(
100
),
ActivityCond
(
101
),
BattlePassNotify
(
102
),
PlayerUseItem
(
1001
),
DropItem
(
1002
),
WeaponUpgrade
(
1011
),
WeaponPromote
(
1012
),
WeaponAwaken
(
1013
),
RelicUpgrade
(
1014
),
Ability
(
1015
),
DungeonStatueDrop
(
1016
),
OfflineMsg
(
1017
),
AvatarUpgrade
(
1018
),
AvatarPromote
(
1019
),
QuestAction
(
1021
),
CityLevelup
(
1022
),
UpgradeSkill
(
1024
),
UnlockTalent
(
1025
),
UpgradeProudSkill
(
1026
),
PlayerLevelLimitUp
(
1027
),
DungeonDaily
(
1028
),
ItemGiving
(
1030
),
ForgeCost
(
1031
),
InvestigationReward
(
1032
),
InvestigationTargetReward
(
1033
),
GadgetInteract
(
1034
),
SeaLampCiMaterial
(
1036
),
SeaLampContributionReward
(
1037
),
SeaLampPhaseReward
(
1038
),
SeaLampFlyLamp
(
1039
),
AutoRecover
(
1040
),
ActivityExpireItem
(
1041
),
SubCoinNegative
(
1042
),
BargainDeduct
(
1043
),
BattlePassPaidReward
(
1044
),
BattlePassLevelReward
(
1045
),
TrialAvatarActivityFirstPassReward
(
1046
),
BuyBattlePassLevel
(
1047
),
GrantBirthdayBenefit
(
1048
),
AchievementReward
(
1049
),
AchievementGoalReward
(
1050
),
FirstShareToSocialNetwork
(
1051
),
DestroyMaterial
(
1052
),
CodexLevelupReward
(
1053
),
HuntingOfferReward
(
1054
),
UseWidgetAnchorPoint
(
1055
),
UseWidgetBonfire
(
1056
),
UngradeWeaponReturnMaterial
(
1057
),
UseWidgetOneoffGatherPointDetector
(
1058
),
UseWidgetClientCollector
(
1059
),
UseWidgetClientDetector
(
1060
),
TakeGeneralReward
(
1061
),
AsterTakeSpecialReward
(
1062
),
RemoveCodexBook
(
1063
),
OfferingItem
(
1064
),
UseWidgetGadgetBuilder
(
1065
),
EffigyFirstPassReward
(
1066
),
EffigyReward
(
1067
),
ReunionFirstGiftReward
(
1068
),
ReunionSignInReward
(
1069
),
ReunionWatcherReward
(
1070
),
SalesmanMpReward
(
1071
),
ActionReasionAvatarPromoteReward
(
1072
),
BlessingRedeemReward
(
1073
),
ActionMiracleRingReward
(
1074
),
ExpeditionReward
(
1075
),
TreasureMapRemoveDetector
(
1076
),
MechanicusDungeonTicket
(
1077
),
MechanicusLevelupGear
(
1078
),
MechanicusBattleSettle
(
1079
),
RegionSearchReward
(
1080
),
UnlockCoopChapter
(
1081
),
TakeCoopReward
(
1082
),
FleurFairDungeonReward
(
1083
),
ActivityScore
(
1084
),
ChannellerSlabOneoffDungeonReward
(
1085
),
FurnitureMakeStart
(
1086
),
FurnitureMakeTake
(
1087
),
FurnitureMakeCancel
(
1088
),
FurnitureMakeFastFinish
(
1089
),
ChannellerSlabLoopDungeonFirstPassReward
(
1090
),
ChannellerSlabLoopDungeonScoreReward
(
1091
),
HomeLimitedShopBuy
(
1092
),
HomeCoinCollect
(
1093
);
private
final
int
value
;
private
static
final
Int2ObjectMap
<
ActionReason
>
map
=
new
Int2ObjectOpenHashMap
<>();
private
static
final
Map
<
String
,
ActionReason
>
stringMap
=
new
HashMap
<>();
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
{
map
.
put
(
e
.
getValue
(),
e
);
stringMap
.
put
(
e
.
name
(),
e
);
});
}
private
ActionReason
(
int
value
)
{
this
.
value
=
value
;
}
public
int
getValue
()
{
return
value
;
}
public
static
ActionReason
getTypeByValue
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
None
);
}
public
static
ActionReason
getTypeByName
(
String
name
)
{
return
stringMap
.
getOrDefault
(
name
,
None
);
}
}
src/main/java/emu/grasscutter/game/props/ClimateType.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
ClimateType
{
CLIMATE_NONE
(
0
),
CLIMATE_SUNNY
(
1
),
CLIMATE_CLOUDY
(
2
),
CLIMATE_RAIN
(
3
),
CLIMATE_THUNDERSTORM
(
4
),
CLIMATE_SNOW
(
5
),
CLIMATE_MIST
(
6
);
private
final
int
value
;
private
static
final
Int2ObjectMap
<
ClimateType
>
map
=
new
Int2ObjectOpenHashMap
<>();
private
static
final
Map
<
String
,
ClimateType
>
stringMap
=
new
HashMap
<>();
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
{
map
.
put
(
e
.
getValue
(),
e
);
stringMap
.
put
(
e
.
name
(),
e
);
});
}
private
ClimateType
(
int
value
)
{
this
.
value
=
value
;
}
public
int
getValue
()
{
return
value
;
}
public
static
ClimateType
getTypeByValue
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
CLIMATE_NONE
);
}
public
static
ClimateType
getTypeByName
(
String
name
)
{
return
stringMap
.
getOrDefault
(
name
,
CLIMATE_NONE
);
}
}
src/main/java/emu/grasscutter/game/props/ElementType.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
emu.grasscutter.utils.Utils
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
ElementType
{
None
(
0
,
FightProperty
.
FIGHT_PROP_MAX_FIRE_ENERGY
),
Fire
(
1
,
FightProperty
.
FIGHT_PROP_MAX_FIRE_ENERGY
,
10101
,
"TeamResonance_Fire_Lv2"
),
Water
(
2
,
FightProperty
.
FIGHT_PROP_MAX_WATER_ENERGY
,
10201
,
"TeamResonance_Water_Lv2"
),
Grass
(
3
,
FightProperty
.
FIGHT_PROP_MAX_GRASS_ENERGY
),
Electric
(
4
,
FightProperty
.
FIGHT_PROP_MAX_ELEC_ENERGY
,
10401
,
"TeamResonance_Electric_Lv2"
),
Ice
(
5
,
FightProperty
.
FIGHT_PROP_MAX_ICE_ENERGY
,
10601
,
"TeamResonance_Ice_Lv2"
),
Frozen
(
6
,
FightProperty
.
FIGHT_PROP_MAX_ICE_ENERGY
),
Wind
(
7
,
FightProperty
.
FIGHT_PROP_MAX_WIND_ENERGY
,
10301
,
"TeamResonance_Wind_Lv2"
),
Rock
(
8
,
FightProperty
.
FIGHT_PROP_MAX_ROCK_ENERGY
,
10701
,
"TeamResonance_Rock_Lv2"
),
AntiFire
(
9
,
FightProperty
.
FIGHT_PROP_MAX_FIRE_ENERGY
),
Default
(
255
,
FightProperty
.
FIGHT_PROP_MAX_FIRE_ENERGY
,
10801
,
"TeamResonance_AllDifferent"
);
private
final
int
value
;
private
final
int
teamResonanceId
;
private
final
FightProperty
energyProperty
;
private
final
int
configHash
;
private
static
final
Int2ObjectMap
<
ElementType
>
map
=
new
Int2ObjectOpenHashMap
<>();
private
static
final
Map
<
String
,
ElementType
>
stringMap
=
new
HashMap
<>();
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
{
map
.
put
(
e
.
getValue
(),
e
);
stringMap
.
put
(
e
.
name
(),
e
);
});
}
private
ElementType
(
int
value
,
FightProperty
energyProperty
)
{
this
(
value
,
energyProperty
,
0
,
null
);
}
private
ElementType
(
int
value
,
FightProperty
energyProperty
,
int
teamResonanceId
,
String
configName
)
{
this
.
value
=
value
;
this
.
energyProperty
=
energyProperty
;
this
.
teamResonanceId
=
teamResonanceId
;
if
(
configName
!=
null
)
{
this
.
configHash
=
Utils
.
abilityHash
(
configName
);
}
else
{
this
.
configHash
=
0
;
}
}
public
int
getValue
()
{
return
value
;
}
public
FightProperty
getEnergyProperty
()
{
return
energyProperty
;
}
public
int
getTeamResonanceId
()
{
return
teamResonanceId
;
}
public
int
getConfigHash
()
{
return
configHash
;
}
public
static
ElementType
getTypeByValue
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
None
);
}
public
static
ElementType
getTypeByName
(
String
name
)
{
return
stringMap
.
getOrDefault
(
name
,
None
);
}
}
src/main/java/emu/grasscutter/game/props/EnterReason.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
EnterReason
{
None
(
0
),
Login
(
1
),
DungeonReplay
(
11
),
DungeonReviveOnWaypoint
(
12
),
DungeonEnter
(
13
),
DungeonQuit
(
14
),
Gm
(
21
),
QuestRollback
(
31
),
Revival
(
32
),
PersonalScene
(
41
),
TransPoint
(
42
),
ClientTransmit
(
43
),
ForceDragBack
(
44
),
TeamKick
(
51
),
TeamJoin
(
52
),
TeamBack
(
53
),
Muip
(
54
),
DungeonInviteAccept
(
55
),
Lua
(
56
),
ActivityLoadTerrain
(
57
),
HostFromSingleToMp
(
58
),
MpPlay
(
59
),
AnchorPoint
(
60
),
LuaSkipUi
(
61
),
ReloadTerrain
(
62
),
DraftTransfer
(
63
),
EnterHome
(
64
),
ExitHome
(
65
),
ChangeHomeModule
(
66
),
Gallery
(
67
),
HomeSceneJump
(
68
),
HideAndSeek
(
69
);
private
final
int
value
;
private
static
final
Int2ObjectMap
<
EnterReason
>
map
=
new
Int2ObjectOpenHashMap
<>();
private
static
final
Map
<
String
,
EnterReason
>
stringMap
=
new
HashMap
<>();
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
{
map
.
put
(
e
.
getValue
(),
e
);
stringMap
.
put
(
e
.
name
(),
e
);
});
}
private
EnterReason
(
int
value
)
{
this
.
value
=
value
;
}
public
int
getValue
()
{
return
value
;
}
public
static
EnterReason
getTypeByValue
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
None
);
}
public
static
EnterReason
getTypeByName
(
String
name
)
{
return
stringMap
.
getOrDefault
(
name
,
None
);
}
}
src/main/java/emu/grasscutter/game/props/EntityIdType.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
public
enum
EntityIdType
{
AVATAR
(
0x01
),
MONSTER
(
0x02
),
NPC
(
0x03
),
GADGET
(
0x04
),
WEAPON
(
0x06
),
TEAM
(
0x09
),
MPLEVEL
(
0x0b
);
private
final
int
id
;
private
EntityIdType
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getId
()
{
return
id
;
}
}
src/main/java/emu/grasscutter/game/props/FightProperty.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
FightProperty
{
FIGHT_PROP_NONE
(
0
),
FIGHT_PROP_BASE_HP
(
1
),
FIGHT_PROP_HP
(
2
),
FIGHT_PROP_HP_PERCENT
(
3
),
FIGHT_PROP_BASE_ATTACK
(
4
),
FIGHT_PROP_ATTACK
(
5
),
FIGHT_PROP_ATTACK_PERCENT
(
6
),
FIGHT_PROP_BASE_DEFENSE
(
7
),
FIGHT_PROP_DEFENSE
(
8
),
FIGHT_PROP_DEFENSE_PERCENT
(
9
),
FIGHT_PROP_BASE_SPEED
(
10
),
FIGHT_PROP_SPEED_PERCENT
(
11
),
FIGHT_PROP_HP_MP_PERCENT
(
12
),
FIGHT_PROP_ATTACK_MP_PERCENT
(
13
),
FIGHT_PROP_CRITICAL
(
20
),
FIGHT_PROP_ANTI_CRITICAL
(
21
),
FIGHT_PROP_CRITICAL_HURT
(
22
),
FIGHT_PROP_CHARGE_EFFICIENCY
(
23
),
FIGHT_PROP_ADD_HURT
(
24
),
FIGHT_PROP_SUB_HURT
(
25
),
FIGHT_PROP_HEAL_ADD
(
26
),
FIGHT_PROP_HEALED_ADD
(
27
),
FIGHT_PROP_ELEMENT_MASTERY
(
28
),
FIGHT_PROP_PHYSICAL_SUB_HURT
(
29
),
FIGHT_PROP_PHYSICAL_ADD_HURT
(
30
),
FIGHT_PROP_DEFENCE_IGNORE_RATIO
(
31
),
FIGHT_PROP_DEFENCE_IGNORE_DELTA
(
32
),
FIGHT_PROP_FIRE_ADD_HURT
(
40
),
FIGHT_PROP_ELEC_ADD_HURT
(
41
),
FIGHT_PROP_WATER_ADD_HURT
(
42
),
FIGHT_PROP_GRASS_ADD_HURT
(
43
),
FIGHT_PROP_WIND_ADD_HURT
(
44
),
FIGHT_PROP_ROCK_ADD_HURT
(
45
),
FIGHT_PROP_ICE_ADD_HURT
(
46
),
FIGHT_PROP_HIT_HEAD_ADD_HURT
(
47
),
FIGHT_PROP_FIRE_SUB_HURT
(
50
),
FIGHT_PROP_ELEC_SUB_HURT
(
51
),
FIGHT_PROP_WATER_SUB_HURT
(
52
),
FIGHT_PROP_GRASS_SUB_HURT
(
53
),
FIGHT_PROP_WIND_SUB_HURT
(
54
),
FIGHT_PROP_ROCK_SUB_HURT
(
55
),
FIGHT_PROP_ICE_SUB_HURT
(
56
),
FIGHT_PROP_EFFECT_HIT
(
60
),
FIGHT_PROP_EFFECT_RESIST
(
61
),
FIGHT_PROP_FREEZE_RESIST
(
62
),
FIGHT_PROP_TORPOR_RESIST
(
63
),
FIGHT_PROP_DIZZY_RESIST
(
64
),
FIGHT_PROP_FREEZE_SHORTEN
(
65
),
FIGHT_PROP_TORPOR_SHORTEN
(
66
),
FIGHT_PROP_DIZZY_SHORTEN
(
67
),
FIGHT_PROP_MAX_FIRE_ENERGY
(
70
),
FIGHT_PROP_MAX_ELEC_ENERGY
(
71
),
FIGHT_PROP_MAX_WATER_ENERGY
(
72
),
FIGHT_PROP_MAX_GRASS_ENERGY
(
73
),
FIGHT_PROP_MAX_WIND_ENERGY
(
74
),
FIGHT_PROP_MAX_ICE_ENERGY
(
75
),
FIGHT_PROP_MAX_ROCK_ENERGY
(
76
),
FIGHT_PROP_SKILL_CD_MINUS_RATIO
(
80
),
FIGHT_PROP_SHIELD_COST_MINUS_RATIO
(
81
),
FIGHT_PROP_CUR_FIRE_ENERGY
(
1000
),
FIGHT_PROP_CUR_ELEC_ENERGY
(
1001
),
FIGHT_PROP_CUR_WATER_ENERGY
(
1002
),
FIGHT_PROP_CUR_GRASS_ENERGY
(
1003
),
FIGHT_PROP_CUR_WIND_ENERGY
(
1004
),
FIGHT_PROP_CUR_ICE_ENERGY
(
1005
),
FIGHT_PROP_CUR_ROCK_ENERGY
(
1006
),
FIGHT_PROP_CUR_HP
(
1010
),
FIGHT_PROP_MAX_HP
(
2000
),
FIGHT_PROP_CUR_ATTACK
(
2001
),
FIGHT_PROP_CUR_DEFENSE
(
2002
),
FIGHT_PROP_CUR_SPEED
(
2003
),
FIGHT_PROP_NONEXTRA_ATTACK
(
3000
),
FIGHT_PROP_NONEXTRA_DEFENSE
(
3001
),
FIGHT_PROP_NONEXTRA_CRITICAL
(
3002
),
FIGHT_PROP_NONEXTRA_ANTI_CRITICAL
(
3003
),
FIGHT_PROP_NONEXTRA_CRITICAL_HURT
(
3004
),
FIGHT_PROP_NONEXTRA_CHARGE_EFFICIENCY
(
3005
),
FIGHT_PROP_NONEXTRA_ELEMENT_MASTERY
(
3006
),
FIGHT_PROP_NONEXTRA_PHYSICAL_SUB_HURT
(
3007
),
FIGHT_PROP_NONEXTRA_FIRE_ADD_HURT
(
3008
),
FIGHT_PROP_NONEXTRA_ELEC_ADD_HURT
(
3009
),
FIGHT_PROP_NONEXTRA_WATER_ADD_HURT
(
3010
),
FIGHT_PROP_NONEXTRA_GRASS_ADD_HURT
(
3011
),
FIGHT_PROP_NONEXTRA_WIND_ADD_HURT
(
3012
),
FIGHT_PROP_NONEXTRA_ROCK_ADD_HURT
(
3013
),
FIGHT_PROP_NONEXTRA_ICE_ADD_HURT
(
3014
),
FIGHT_PROP_NONEXTRA_FIRE_SUB_HURT
(
3015
),
FIGHT_PROP_NONEXTRA_ELEC_SUB_HURT
(
3016
),
FIGHT_PROP_NONEXTRA_WATER_SUB_HURT
(
3017
),
FIGHT_PROP_NONEXTRA_GRASS_SUB_HURT
(
3018
),
FIGHT_PROP_NONEXTRA_WIND_SUB_HURT
(
3019
),
FIGHT_PROP_NONEXTRA_ROCK_SUB_HURT
(
3020
),
FIGHT_PROP_NONEXTRA_ICE_SUB_HURT
(
3021
),
FIGHT_PROP_NONEXTRA_SKILL_CD_MINUS_RATIO
(
3022
),
FIGHT_PROP_NONEXTRA_SHIELD_COST_MINUS_RATIO
(
3023
),
FIGHT_PROP_NONEXTRA_PHYSICAL_ADD_HURT
(
3024
);
private
final
int
id
;
private
static
final
Int2ObjectMap
<
FightProperty
>
map
=
new
Int2ObjectOpenHashMap
<>();
private
static
final
Map
<
String
,
FightProperty
>
stringMap
=
new
HashMap
<>();
public
static
final
int
[]
fightProps
=
new
int
[]
{
1
,
4
,
7
,
20
,
21
,
22
,
23
,
26
,
27
,
28
,
29
,
30
,
40
,
41
,
42
,
43
,
44
,
45
,
46
,
50
,
51
,
52
,
53
,
54
,
55
,
56
,
2000
,
2001
,
2002
,
2003
,
1010
};
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
{
map
.
put
(
e
.
getId
(),
e
);
stringMap
.
put
(
e
.
name
(),
e
);
});
}
private
FightProperty
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getId
()
{
return
id
;
}
public
static
FightProperty
getPropById
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
FIGHT_PROP_NONE
);
}
public
static
FightProperty
getPropByName
(
String
name
)
{
return
stringMap
.
getOrDefault
(
name
,
FIGHT_PROP_NONE
);
}
}
src/main/java/emu/grasscutter/game/props/GrowCurve.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
GrowCurve
{
GROW_CURVE_NONE
(
0
),
GROW_CURVE_HP
(
1
),
GROW_CURVE_ATTACK
(
2
),
GROW_CURVE_STAMINA
(
3
),
GROW_CURVE_STRIKE
(
4
),
GROW_CURVE_ANTI_STRIKE
(
5
),
GROW_CURVE_ANTI_STRIKE1
(
6
),
GROW_CURVE_ANTI_STRIKE2
(
7
),
GROW_CURVE_ANTI_STRIKE3
(
8
),
GROW_CURVE_STRIKE_HURT
(
9
),
GROW_CURVE_ELEMENT
(
10
),
GROW_CURVE_KILL_EXP
(
11
),
GROW_CURVE_DEFENSE
(
12
),
GROW_CURVE_ATTACK_BOMB
(
13
),
GROW_CURVE_HP_LITTLEMONSTER
(
14
),
GROW_CURVE_ELEMENT_MASTERY
(
15
),
GROW_CURVE_PROGRESSION
(
16
),
GROW_CURVE_DEFENDING
(
17
),
GROW_CURVE_MHP
(
18
),
GROW_CURVE_MATK
(
19
),
GROW_CURVE_TOWERATK
(
20
),
GROW_CURVE_HP_S5
(
21
),
GROW_CURVE_HP_S4
(
22
),
GROW_CURVE_HP_2
(
23
),
GROW_CURVE_ATTACK_S5
(
31
),
GROW_CURVE_ATTACK_S4
(
32
),
GROW_CURVE_ATTACK_S3
(
33
),
GROW_CURVE_STRIKE_S5
(
34
),
GROW_CURVE_DEFENSE_S5
(
41
),
GROW_CURVE_DEFENSE_S4
(
42
),
GROW_CURVE_ATTACK_101
(
1101
),
GROW_CURVE_ATTACK_102
(
1102
),
GROW_CURVE_ATTACK_103
(
1103
),
GROW_CURVE_ATTACK_104
(
1104
),
GROW_CURVE_ATTACK_105
(
1105
),
GROW_CURVE_ATTACK_201
(
1201
),
GROW_CURVE_ATTACK_202
(
1202
),
GROW_CURVE_ATTACK_203
(
1203
),
GROW_CURVE_ATTACK_204
(
1204
),
GROW_CURVE_ATTACK_205
(
1205
),
GROW_CURVE_ATTACK_301
(
1301
),
GROW_CURVE_ATTACK_302
(
1302
),
GROW_CURVE_ATTACK_303
(
1303
),
GROW_CURVE_ATTACK_304
(
1304
),
GROW_CURVE_ATTACK_305
(
1305
),
GROW_CURVE_CRITICAL_101
(
2101
),
GROW_CURVE_CRITICAL_102
(
2102
),
GROW_CURVE_CRITICAL_103
(
2103
),
GROW_CURVE_CRITICAL_104
(
2104
),
GROW_CURVE_CRITICAL_105
(
2105
),
GROW_CURVE_CRITICAL_201
(
2201
),
GROW_CURVE_CRITICAL_202
(
2202
),
GROW_CURVE_CRITICAL_203
(
2203
),
GROW_CURVE_CRITICAL_204
(
2204
),
GROW_CURVE_CRITICAL_205
(
2205
),
GROW_CURVE_CRITICAL_301
(
2301
),
GROW_CURVE_CRITICAL_302
(
2302
),
GROW_CURVE_CRITICAL_303
(
2303
),
GROW_CURVE_CRITICAL_304
(
2304
),
GROW_CURVE_CRITICAL_305
(
2305
);
private
final
int
id
;
private
static
final
Int2ObjectMap
<
GrowCurve
>
map
=
new
Int2ObjectOpenHashMap
<>();
private
static
final
Map
<
String
,
GrowCurve
>
stringMap
=
new
HashMap
<>();
public
static
final
int
[]
fightProps
=
new
int
[]
{
1
,
4
,
7
,
20
,
21
,
22
,
23
,
26
,
27
,
28
,
29
,
30
,
40
,
41
,
42
,
43
,
44
,
45
,
46
,
50
,
51
,
52
,
53
,
54
,
55
,
56
,
2000
,
2001
,
2002
,
2003
,
1010
};
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
{
map
.
put
(
e
.
getId
(),
e
);
stringMap
.
put
(
e
.
name
(),
e
);
});
}
private
GrowCurve
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getId
()
{
return
id
;
}
public
static
GrowCurve
getPropById
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
GROW_CURVE_NONE
);
}
public
static
GrowCurve
getPropByName
(
String
name
)
{
return
stringMap
.
getOrDefault
(
name
,
GROW_CURVE_NONE
);
}
}
src/main/java/emu/grasscutter/game/props/LifeState.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
LifeState
{
LIFE_NONE
(
0
),
LIFE_ALIVE
(
1
),
LIFE_DEAD
(
2
),
LIFE_REVIVE
(
3
);
private
final
int
value
;
private
static
final
Int2ObjectMap
<
LifeState
>
map
=
new
Int2ObjectOpenHashMap
<>();
private
static
final
Map
<
String
,
LifeState
>
stringMap
=
new
HashMap
<>();
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
{
map
.
put
(
e
.
getValue
(),
e
);
stringMap
.
put
(
e
.
name
(),
e
);
});
}
private
LifeState
(
int
value
)
{
this
.
value
=
value
;
}
public
int
getValue
()
{
return
value
;
}
public
static
LifeState
getTypeByValue
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
LIFE_NONE
);
}
public
static
LifeState
getTypeByName
(
String
name
)
{
return
stringMap
.
getOrDefault
(
name
,
LIFE_NONE
);
}
}
src/main/java/emu/grasscutter/game/props/OpenState.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
OpenState
{
OPEN_STATE_NONE
(
0
),
OPEN_STATE_PAIMON
(
1
),
OPEN_STATE_PAIMON_NAVIGATION
(
2
),
OPEN_STATE_AVATAR_PROMOTE
(
3
),
OPEN_STATE_AVATAR_TALENT
(
4
),
OPEN_STATE_WEAPON_PROMOTE
(
5
),
OPEN_STATE_WEAPON_AWAKEN
(
6
),
OPEN_STATE_QUEST_REMIND
(
7
),
OPEN_STATE_GAME_GUIDE
(
8
),
OPEN_STATE_COOK
(
9
),
OPEN_STATE_WEAPON_UPGRADE
(
10
),
OPEN_STATE_RELIQUARY_UPGRADE
(
11
),
OPEN_STATE_RELIQUARY_PROMOTE
(
12
),
OPEN_STATE_WEAPON_PROMOTE_GUIDE
(
13
),
OPEN_STATE_WEAPON_CHANGE_GUIDE
(
14
),
OPEN_STATE_PLAYER_LVUP_GUIDE
(
15
),
OPEN_STATE_FRESHMAN_GUIDE
(
16
),
OPEN_STATE_SKIP_FRESHMAN_GUIDE
(
17
),
OPEN_STATE_GUIDE_MOVE_CAMERA
(
18
),
OPEN_STATE_GUIDE_SCALE_CAMERA
(
19
),
OPEN_STATE_GUIDE_KEYBOARD
(
20
),
OPEN_STATE_GUIDE_MOVE
(
21
),
OPEN_STATE_GUIDE_JUMP
(
22
),
OPEN_STATE_GUIDE_SPRINT
(
23
),
OPEN_STATE_GUIDE_MAP
(
24
),
OPEN_STATE_GUIDE_ATTACK
(
25
),
OPEN_STATE_GUIDE_FLY
(
26
),
OPEN_STATE_GUIDE_TALENT
(
27
),
OPEN_STATE_GUIDE_RELIC
(
28
),
OPEN_STATE_GUIDE_RELIC_PROM
(
29
),
OPEN_STATE_COMBINE
(
30
),
OPEN_STATE_GACHA
(
31
),
OPEN_STATE_GUIDE_GACHA
(
32
),
OPEN_STATE_GUIDE_TEAM
(
33
),
OPEN_STATE_GUIDE_PROUD
(
34
),
OPEN_STATE_GUIDE_AVATAR_PROMOTE
(
35
),
OPEN_STATE_GUIDE_ADVENTURE_CARD
(
36
),
OPEN_STATE_FORGE
(
37
),
OPEN_STATE_GUIDE_BAG
(
38
),
OPEN_STATE_EXPEDITION
(
39
),
OPEN_STATE_GUIDE_ADVENTURE_DAILYTASK
(
40
),
OPEN_STATE_GUIDE_ADVENTURE_DUNGEON
(
41
),
OPEN_STATE_TOWER
(
42
),
OPEN_STATE_WORLD_STAMINA
(
43
),
OPEN_STATE_TOWER_FIRST_ENTER
(
44
),
OPEN_STATE_RESIN
(
45
),
OPEN_STATE_LIMIT_REGION_FRESHMEAT
(
47
),
OPEN_STATE_LIMIT_REGION_GLOBAL
(
48
),
OPEN_STATE_MULTIPLAYER
(
49
),
OPEN_STATE_GUIDE_MOUSEPC
(
50
),
OPEN_STATE_GUIDE_MULTIPLAYER
(
51
),
OPEN_STATE_GUIDE_DUNGEONREWARD
(
52
),
OPEN_STATE_GUIDE_BLOSSOM
(
53
),
OPEN_STATE_AVATAR_FASHION
(
54
),
OPEN_STATE_PHOTOGRAPH
(
55
),
OPEN_STATE_GUIDE_KSLQUEST
(
56
),
OPEN_STATE_PERSONAL_LINE
(
57
),
OPEN_STATE_GUIDE_PERSONAL_LINE
(
58
),
OPEN_STATE_GUIDE_APPEARANCE
(
59
),
OPEN_STATE_GUIDE_PROCESS
(
60
),
OPEN_STATE_GUIDE_PERSONAL_LINE_KEY
(
61
),
OPEN_STATE_GUIDE_WIDGET
(
62
),
OPEN_STATE_GUIDE_ACTIVITY_SKILL_ASTER
(
63
),
OPEN_STATE_GUIDE_COLDCLIMATE
(
64
),
OPEN_STATE_DERIVATIVE_MALL
(
65
),
OPEN_STATE_GUIDE_EXITMULTIPLAYER
(
66
),
OPEN_STATE_GUIDE_THEATREMACHANICUS_BUILD
(
67
),
OPEN_STATE_GUIDE_THEATREMACHANICUS_REBUILD
(
68
),
OPEN_STATE_GUIDE_THEATREMACHANICUS_CARD
(
69
),
OPEN_STATE_GUIDE_THEATREMACHANICUS_MONSTER
(
70
),
OPEN_STATE_GUIDE_THEATREMACHANICUS_MISSION_CHECK
(
71
),
OPEN_STATE_GUIDE_THEATREMACHANICUS_BUILD_SELECT
(
72
),
OPEN_STATE_GUIDE_THEATREMACHANICUS_CHALLENGE_START
(
73
),
OPEN_STATE_GUIDE_CONVERT
(
74
),
OPEN_STATE_GUIDE_THEATREMACHANICUS_MULTIPLAYER
(
75
),
OPEN_STATE_GUIDE_COOP_TASK
(
76
),
OPEN_STATE_GUIDE_HOMEWORLD_ADEPTIABODE
(
77
),
OPEN_STATE_GUIDE_HOMEWORLD_DEPLOY
(
78
),
OPEN_STATE_GUIDE_CHANNELLERSLAB_EQUIP
(
79
),
OPEN_STATE_GUIDE_CHANNELLERSLAB_MP_SOLUTION
(
80
),
OPEN_STATE_GUIDE_CHANNELLERSLAB_POWER
(
81
),
OPEN_STATE_GUIDE_HIDEANDSEEK_SKILL
(
82
),
OPEN_STATE_GUIDE_HOMEWORLD_MAPLIST
(
83
),
OPEN_STATE_GUIDE_RELICRESOLVE
(
84
),
OPEN_STATE_GUIDE_GGUIDE
(
85
),
OPEN_STATE_GUIDE_GGUIDE_HINT
(
86
),
OPEN_STATE_CITY_REPUATION_MENGDE
(
800
),
OPEN_STATE_CITY_REPUATION_LIYUE
(
801
),
OPEN_STATE_CITY_REPUATION_UI_HINT
(
802
),
OPEN_STATE_CITY_REPUATION_INAZUMA
(
803
),
OPEN_STATE_SHOP_TYPE_MALL
(
900
),
OPEN_STATE_SHOP_TYPE_RECOMMANDED
(
901
),
OPEN_STATE_SHOP_TYPE_GENESISCRYSTAL
(
902
),
OPEN_STATE_SHOP_TYPE_GIFTPACKAGE
(
903
),
OPEN_STATE_SHOP_TYPE_PAIMON
(
1001
),
OPEN_STATE_SHOP_TYPE_CITY
(
1002
),
OPEN_STATE_SHOP_TYPE_BLACKSMITH
(
1003
),
OPEN_STATE_SHOP_TYPE_GROCERY
(
1004
),
OPEN_STATE_SHOP_TYPE_FOOD
(
1005
),
OPEN_STATE_SHOP_TYPE_SEA_LAMP
(
1006
),
OPEN_STATE_SHOP_TYPE_VIRTUAL_SHOP
(
1007
),
OPEN_STATE_SHOP_TYPE_LIYUE_GROCERY
(
1008
),
OPEN_STATE_SHOP_TYPE_LIYUE_SOUVENIR
(
1009
),
OPEN_STATE_SHOP_TYPE_LIYUE_RESTAURANT
(
1010
),
OPEN_STATE_SHOP_TYPE_INAZUMA_SOUVENIR
(
1011
),
OPEN_STATE_SHOP_TYPE_NPC_TOMOKI
(
1012
),
OPEN_ADVENTURE_MANUAL
(
1100
),
OPEN_ADVENTURE_MANUAL_CITY_MENGDE
(
1101
),
OPEN_ADVENTURE_MANUAL_CITY_LIYUE
(
1102
),
OPEN_ADVENTURE_MANUAL_MONSTER
(
1103
),
OPEN_ADVENTURE_MANUAL_BOSS_DUNGEON
(
1104
),
OPEN_STATE_ACTIVITY_SEALAMP
(
1200
),
OPEN_STATE_ACTIVITY_SEALAMP_TAB2
(
1201
),
OPEN_STATE_ACTIVITY_SEALAMP_TAB3
(
1202
),
OPEN_STATE_BATTLE_PASS
(
1300
),
OPEN_STATE_BATTLE_PASS_ENTRY
(
1301
),
OPEN_STATE_ACTIVITY_CRUCIBLE
(
1400
),
OPEN_STATE_ACTIVITY_NEWBEEBOUNS_OPEN
(
1401
),
OPEN_STATE_ACTIVITY_NEWBEEBOUNS_CLOSE
(
1402
),
OPEN_STATE_ACTIVITY_ENTRY_OPEN
(
1403
),
OPEN_STATE_MENGDE_INFUSEDCRYSTAL
(
1404
),
OPEN_STATE_LIYUE_INFUSEDCRYSTAL
(
1405
),
OPEN_STATE_SNOW_MOUNTAIN_ELDER_TREE
(
1406
),
OPEN_STATE_MIRACLE_RING
(
1407
),
OPEN_STATE_COOP_LINE
(
1408
),
OPEN_STATE_INAZUMA_INFUSEDCRYSTAL
(
1409
),
OPEN_STATE_FISH
(
1410
),
OPEN_STATE_GUIDE_SUMO_TEAM_SKILL
(
1411
),
OPEN_STATE_GUIDE_FISH_RECIPE
(
1412
),
OPEN_STATE_HOME
(
1500
),
OPEN_STATE_ACTIVITY_HOMEWORLD
(
1501
),
OPEN_STATE_ADEPTIABODE
(
1502
),
OPEN_STATE_HOME_AVATAR
(
1503
),
OPEN_STATE_HOME_EDIT
(
1504
),
OPEN_STATE_HOME_EDIT_TIPS
(
1505
),
OPEN_STATE_RELIQUARY_DECOMPOSE
(
1600
),
OPEN_STATE_ACTIVITY_H5
(
1700
),
OPEN_STATE_ORAIONOKAMI
(
2000
),
OPEN_STATE_GUIDE_CHESS_MISSION_CHECK
(
2001
),
OPEN_STATE_GUIDE_CHESS_BUILD
(
2002
),
OPEN_STATE_GUIDE_CHESS_WIND_TOWER_CIRCLE
(
2003
),
OPEN_STATE_GUIDE_CHESS_CARD_SELECT
(
2004
),
OPEN_STATE_INAZUMA_MAINQUEST_FINISHED
(
2005
),
OPEN_STATE_PAIMON_LVINFO
(
2100
),
OPEN_STATE_TELEPORT_HUD
(
2101
),
OPEN_STATE_GUIDE_MAP_UNLOCK
(
2102
),
OPEN_STATE_GUIDE_PAIMON_LVINFO
(
2103
),
OPEN_STATE_GUIDE_AMBORTRANSPORT
(
2104
),
OPEN_STATE_GUIDE_FLY_SECOND
(
2105
),
OPEN_STATE_GUIDE_KAEYA_CLUE
(
2106
),
OPEN_STATE_CAPTURE_CODEX
(
2107
),
OPEN_STATE_ACTIVITY_FISH_OPEN
(
2200
),
OPEN_STATE_ACTIVITY_FISH_CLOSE
(
2201
),
OPEN_STATE_GUIDE_ROGUE_MAP
(
2205
),
OPEN_STATE_GUIDE_ROGUE_RUNE
(
2206
),
OPEN_STATE_GUIDE_BARTENDER_FORMULA
(
2210
),
OPEN_STATE_GUIDE_BARTENDER_MIX
(
2211
),
OPEN_STATE_GUIDE_BARTENDER_CUP
(
2212
),
OPEN_STATE_GUIDE_MAIL_FAVORITES
(
2400
),
OPEN_STATE_GUIDE_POTION_CONFIGURE
(
2401
),
OPEN_STATE_GUIDE_LANV2_FIREWORK
(
2402
),
OPEN_STATE_LOADINGTIPS_ENKANOMIYA
(
2403
),
OPEN_STATE_MICHIAE_CASKET
(
2500
),
OPEN_STATE_MAIL_COLLECT_UNLOCK_RED_POINT
(
2501
),
OPEN_STATE_LUMEN_STONE
(
2600
),
OPEN_STATE_GUIDE_CRYSTALLINK_BUFF
(
2601
);
private
final
int
value
;
private
static
final
Int2ObjectMap
<
OpenState
>
map
=
new
Int2ObjectOpenHashMap
<>();
private
static
final
Map
<
String
,
OpenState
>
stringMap
=
new
HashMap
<>();
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
{
map
.
put
(
e
.
getValue
(),
e
);
stringMap
.
put
(
e
.
name
(),
e
);
});
}
private
OpenState
(
int
value
)
{
this
.
value
=
value
;
}
public
int
getValue
()
{
return
value
;
}
public
static
OpenState
getTypeByValue
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
OPEN_STATE_NONE
);
}
public
static
OpenState
getTypeByName
(
String
name
)
{
return
stringMap
.
getOrDefault
(
name
,
OPEN_STATE_NONE
);
}
}
src/main/java/emu/grasscutter/game/props/PlayerProperty.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.props
;
import
java.util.stream.Stream
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
enum
PlayerProperty
{
PROP_EXP
(
1001
),
PROP_BREAK_LEVEL
(
1002
),
PROP_SATIATION_VAL
(
1003
),
PROP_SATIATION_PENALTY_TIME
(
1004
),
PROP_LEVEL
(
4001
),
PROP_LAST_CHANGE_AVATAR_TIME
(
10001
),
PROP_MAX_SPRING_VOLUME
(
10002
),
PROP_CUR_SPRING_VOLUME
(
10003
),
PROP_IS_SPRING_AUTO_USE
(
10004
),
PROP_SPRING_AUTO_USE_PERCENT
(
10005
),
PROP_IS_FLYABLE
(
10006
),
PROP_IS_WEATHER_LOCKED
(
10007
),
PROP_IS_GAME_TIME_LOCKED
(
10008
),
PROP_IS_TRANSFERABLE
(
10009
),
PROP_MAX_STAMINA
(
10010
),
PROP_CUR_PERSIST_STAMINA
(
10011
),
PROP_CUR_TEMPORARY_STAMINA
(
10012
),
PROP_PLAYER_LEVEL
(
10013
),
PROP_PLAYER_EXP
(
10014
),
PROP_PLAYER_HCOIN
(
10015
),
// Primogem
PROP_PLAYER_SCOIN
(
10016
),
// Mora
PROP_PLAYER_MP_SETTING_TYPE
(
10017
),
PROP_IS_MP_MODE_AVAILABLE
(
10018
),
PROP_PLAYER_WORLD_LEVEL
(
10019
),
PROP_PLAYER_RESIN
(
10020
),
PROP_PLAYER_WAIT_SUB_HCOIN
(
10022
),
PROP_PLAYER_WAIT_SUB_SCOIN
(
10023
),
PROP_IS_ONLY_MP_WITH_PS_PLAYER
(
10024
),
PROP_PLAYER_MCOIN
(
10025
),
// Genesis Crystal
PROP_PLAYER_WAIT_SUB_MCOIN
(
10026
),
PROP_PLAYER_LEGENDARY_KEY
(
10027
),
PROP_IS_HAS_FIRST_SHARE
(
10028
),
PROP_PLAYER_FORGE_POINT
(
10029
),
PROP_CUR_CLIMATE_METER
(
10035
),
PROP_CUR_CLIMATE_TYPE
(
10036
),
PROP_CUR_CLIMATE_AREA_ID
(
10037
),
PROP_CUR_CLIMATE_AREA_CLIMATE_TYPE
(
10038
),
PROP_PLAYER_WORLD_LEVEL_LIMIT
(
10039
),
PROP_PLAYER_WORLD_LEVEL_ADJUST_CD
(
10040
),
PROP_PLAYER_LEGENDARY_DAILY_TASK_NUM
(
10041
),
PROP_PLAYER_HOME_COIN
(
10042
),
PROP_PLAYER_WAIT_SUB_HOME_COIN
(
10043
);
private
final
int
id
;
private
static
final
Int2ObjectMap
<
PlayerProperty
>
map
=
new
Int2ObjectOpenHashMap
<>();
static
{
Stream
.
of
(
values
()).
forEach
(
e
->
map
.
put
(
e
.
getId
(),
e
));
}
private
PlayerProperty
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getId
()
{
return
id
;
}
public
static
PlayerProperty
getPropById
(
int
value
)
{
return
map
.
getOrDefault
(
value
,
null
);
}
}
src/main/java/emu/grasscutter/game/shop/ShopInfo.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.shop
;
public
class
ShopInfo
{
}
src/main/java/emu/grasscutter/game/shop/ShopManager.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.game.shop
;
import
emu.grasscutter.server.game.GameServer
;
public
class
ShopManager
{
private
final
GameServer
server
;
public
ShopManager
(
GameServer
server
)
{
this
.
server
=
server
;
}
public
GameServer
getServer
()
{
return
server
;
}
}
src/main/java/emu/grasscutter/net/packet/GenshinPacket.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.net.packet
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
com.google.protobuf.GeneratedMessageV3
;
import
emu.grasscutter.net.proto.PacketHeadOuterClass.PacketHead
;
import
emu.grasscutter.utils.Crypto
;
public
class
GenshinPacket
{
private
static
final
int
const1
=
17767
;
// 0x4567
private
static
final
int
const2
=
-
30293
;
// 0x89ab
private
int
opcode
;
private
boolean
shouldBuildHeader
=
false
;
private
byte
[]
header
;
private
byte
[]
data
;
// Encryption
private
boolean
useDispatchKey
;
public
boolean
shouldEncrypt
=
true
;
public
GenshinPacket
(
int
opcode
)
{
this
.
opcode
=
opcode
;
}
public
GenshinPacket
(
int
opcode
,
int
clientSequence
)
{
this
.
opcode
=
opcode
;
this
.
buildHeader
(
clientSequence
);
}
public
GenshinPacket
(
int
opcode
,
boolean
buildHeader
)
{
this
.
opcode
=
opcode
;
this
.
shouldBuildHeader
=
buildHeader
;
}
public
int
getOpcode
()
{
return
opcode
;
}
public
void
setOpcode
(
int
opcode
)
{
this
.
opcode
=
opcode
;
}
public
boolean
useDispatchKey
()
{
return
useDispatchKey
;
}
public
void
setUseDispatchKey
(
boolean
useDispatchKey
)
{
this
.
useDispatchKey
=
useDispatchKey
;
}
public
byte
[]
getHeader
()
{
return
header
;
}
public
void
setHeader
(
byte
[]
header
)
{
this
.
header
=
header
;
}
public
boolean
shouldBuildHeader
()
{
return
shouldBuildHeader
;
}
public
byte
[]
getData
()
{
return
data
;
}
public
void
setData
(
byte
[]
data
)
{
this
.
data
=
data
;
}
public
void
setData
(
GeneratedMessageV3
proto
)
{
this
.
data
=
proto
.
toByteArray
();
}
@SuppressWarnings
(
"rawtypes"
)
public
void
setData
(
GeneratedMessageV3
.
Builder
proto
)
{
this
.
data
=
proto
.
build
().
toByteArray
();
}
public
GenshinPacket
buildHeader
(
int
clientSequence
)
{
if
(
this
.
getHeader
()
!=
null
&&
clientSequence
==
0
)
{
return
this
;
}
setHeader
(
PacketHead
.
newBuilder
().
setClientSequenceId
(
clientSequence
).
setTimestamp
(
System
.
currentTimeMillis
()).
build
().
toByteArray
());
return
this
;
}
public
byte
[]
build
()
{
if
(
getHeader
()
==
null
)
{
this
.
header
=
new
byte
[
0
];
}
if
(
getData
()
==
null
)
{
this
.
data
=
new
byte
[
0
];
}
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
(
2
+
2
+
2
+
4
+
getHeader
().
length
+
getData
().
length
+
2
);
this
.
writeUint16
(
baos
,
const1
);
this
.
writeUint16
(
baos
,
opcode
);
this
.
writeUint16
(
baos
,
header
.
length
);
this
.
writeUint32
(
baos
,
data
.
length
);
this
.
writeBytes
(
baos
,
header
);
this
.
writeBytes
(
baos
,
data
);
this
.
writeUint16
(
baos
,
const2
);
byte
[]
packet
=
baos
.
toByteArray
();
if
(
this
.
shouldEncrypt
)
{
Crypto
.
xor
(
packet
,
this
.
useDispatchKey
()
?
Crypto
.
DISPATCH_KEY
:
Crypto
.
ENCRYPT_KEY
);
}
return
packet
;
}
public
void
writeUint16
(
ByteArrayOutputStream
baos
,
int
i
)
{
// Unsigned short
baos
.
write
((
byte
)
((
i
>>>
8
)
&
0xFF
));
baos
.
write
((
byte
)
(
i
&
0xFF
));
}
public
void
writeUint32
(
ByteArrayOutputStream
baos
,
int
i
)
{
// Unsigned int (long)
baos
.
write
((
byte
)
((
i
>>>
24
)
&
0xFF
));
baos
.
write
((
byte
)
((
i
>>>
16
)
&
0xFF
));
baos
.
write
((
byte
)
((
i
>>>
8
)
&
0xFF
));
baos
.
write
((
byte
)
(
i
&
0xFF
));
}
public
void
writeBytes
(
ByteArrayOutputStream
baos
,
byte
[]
bytes
)
{
try
{
baos
.
write
(
bytes
);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
}
src/main/java/emu/grasscutter/net/packet/Opcodes.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.net.packet
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
Opcodes
{
/** Opcode for the packet/handler */
int
value
();
/** HANDLER ONLY - will disable this handler from being registered */
boolean
disabled
()
default
false
;
}
src/main/java/emu/grasscutter/net/packet/PacketHandler.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.net.packet
;
import
emu.grasscutter.server.game.GameSession
;
public
abstract
class
PacketHandler
{
protected
static
final
byte
[]
EMPTY_BYTE_ARRAY
=
new
byte
[
0
];
public
abstract
void
handle
(
GameSession
session
,
byte
[]
header
,
byte
[]
payload
)
throws
Exception
;
}
src/main/java/emu/grasscutter/net/packet/PacketOpcodes.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.net.packet
;
public
class
PacketOpcodes
{
// Empty
public
static
final
int
NONE
=
0
;
// Opcodes
public
static
final
int
AbilityChangeNotify
=
1179
;
public
static
final
int
AbilityInvocationFailNotify
=
1137
;
public
static
final
int
AbilityInvocationFixedNotify
=
1160
;
public
static
final
int
AbilityInvocationsNotify
=
1133
;
public
static
final
int
AcceptCityReputationRequestReq
=
2845
;
public
static
final
int
AcceptCityReputationRequestRsp
=
2875
;
public
static
final
int
AchievementAllDataNotify
=
1155
;
public
static
final
int
AchievementUpdateNotify
=
1146
;
public
static
final
int
ActivityCoinInfoNotify
=
2056
;
public
static
final
int
ActivityCondStateChangeNotify
=
2162
;
public
static
final
int
ActivityInfoNotify
=
2023
;
public
static
final
int
ActivityPlayOpenAnimNotify
=
2164
;
public
static
final
int
ActivitySaleChangeNotify
=
2043
;
public
static
final
int
ActivityScheduleInfoNotify
=
2187
;
public
static
final
int
ActivitySelectAvatarCardReq
=
2153
;
public
static
final
int
ActivitySelectAvatarCardRsp
=
2069
;
public
static
final
int
ActivityTakeAllScoreRewardRsp
=
8836
;
public
static
final
int
ActivityTakeWatcherRewardBatchReq
=
2027
;
public
static
final
int
ActivityTakeWatcherRewardBatchRsp
=
2036
;
public
static
final
int
ActivityTakeWatcherRewardReq
=
2074
;
public
static
final
int
ActivityTakeWatcherRewardRsp
=
2180
;
public
static
final
int
ActivityUpdateWatcherNotify
=
2101
;
public
static
final
int
AddBlacklistReq
=
4067
;
public
static
final
int
AddBlacklistRsp
=
4020
;
public
static
final
int
AddFriendNotify
=
4026
;
public
static
final
int
AddNoGachaAvatarCardNotify
=
1740
;
public
static
final
int
AddQuestContentProgressReq
=
493
;
public
static
final
int
AddQuestContentProgressRsp
=
444
;
public
static
final
int
AddRandTaskInfoNotify
=
147
;
public
static
final
int
AddSeenMonsterNotify
=
242
;
public
static
final
int
AdjustWorldLevelReq
=
104
;
public
static
final
int
AdjustWorldLevelRsp
=
106
;
public
static
final
int
AllCoopInfoNotify
=
1985
;
public
static
final
int
AllMarkPointNotify
=
3462
;
public
static
final
int
AllSeenMonsterNotify
=
276
;
public
static
final
int
AllWidgetDataNotify
=
4284
;
public
static
final
int
AnchorPointDataNotify
=
4285
;
public
static
final
int
AnchorPointOpReq
=
4298
;
public
static
final
int
AnchorPointOpRsp
=
4263
;
public
static
final
int
AnimatorForceSetAirMoveNotify
=
308
;
public
static
final
int
AntiAddictNotify
=
177
;
public
static
final
int
ArenaChallengeFinishNotify
=
2083
;
public
static
final
int
AskAddFriendNotify
=
4062
;
public
static
final
int
AskAddFriendReq
=
4037
;
public
static
final
int
AskAddFriendRsp
=
4093
;
public
static
final
int
AsterLargeInfoNotify
=
2133
;
public
static
final
int
AsterLittleInfoNotify
=
2058
;
public
static
final
int
AsterMidCampInfoNotify
=
2115
;
public
static
final
int
AsterMidInfoNotify
=
2151
;
public
static
final
int
AsterMiscInfoNotify
=
2098
;
public
static
final
int
AsterProgressInfoNotify
=
2065
;
public
static
final
int
AvatarAddNotify
=
1759
;
public
static
final
int
AvatarBuffAddNotify
=
367
;
public
static
final
int
AvatarBuffDelNotify
=
320
;
public
static
final
int
AvatarCardChangeReq
=
667
;
public
static
final
int
AvatarCardChangeRsp
=
620
;
public
static
final
int
AvatarChangeCostumeNotify
=
1748
;
public
static
final
int
AvatarChangeCostumeReq
=
1650
;
public
static
final
int
AvatarChangeCostumeRsp
=
1632
;
public
static
final
int
AvatarChangeElementTypeReq
=
1741
;
public
static
final
int
AvatarChangeElementTypeRsp
=
1626
;
public
static
final
int
AvatarDataNotify
=
1757
;
public
static
final
int
AvatarDelNotify
=
1624
;
public
static
final
int
AvatarDieAnimationEndReq
=
1635
;
public
static
final
int
AvatarDieAnimationEndRsp
=
1638
;
public
static
final
int
AvatarEnterElementViewNotify
=
366
;
public
static
final
int
AvatarEquipAffixStartNotify
=
1734
;
public
static
final
int
AvatarEquipChangeNotify
=
674
;
public
static
final
int
AvatarExpeditionAllDataReq
=
1721
;
public
static
final
int
AvatarExpeditionAllDataRsp
=
1800
;
public
static
final
int
AvatarExpeditionCallBackReq
=
1607
;
public
static
final
int
AvatarExpeditionCallBackRsp
=
1783
;
public
static
final
int
AvatarExpeditionDataNotify
=
1777
;
public
static
final
int
AvatarExpeditionGetRewardReq
=
1604
;
public
static
final
int
AvatarExpeditionGetRewardRsp
=
1731
;
public
static
final
int
AvatarExpeditionStartReq
=
1788
;
public
static
final
int
AvatarExpeditionStartRsp
=
1786
;
public
static
final
int
AvatarFetterDataNotify
=
1718
;
public
static
final
int
AvatarFetterLevelRewardReq
=
1717
;
public
static
final
int
AvatarFetterLevelRewardRsp
=
1690
;
public
static
final
int
AvatarFightPropNotify
=
1237
;
public
static
final
int
AvatarFightPropUpdateNotify
=
1293
;
public
static
final
int
AvatarFlycloakChangeNotify
=
1761
;
public
static
final
int
AvatarFollowRouteNotify
=
3210
;
public
static
final
int
AvatarGainCostumeNotify
=
1778
;
public
static
final
int
AvatarGainFlycloakNotify
=
1676
;
public
static
final
int
AvatarLifeStateChangeNotify
=
1245
;
public
static
final
int
AvatarPromoteGetRewardReq
=
1784
;
public
static
final
int
AvatarPromoteGetRewardRsp
=
1776
;
public
static
final
int
AvatarPromoteReq
=
1661
;
public
static
final
int
AvatarPromoteRsp
=
1712
;
public
static
final
int
AvatarPropChangeReasonNotify
=
1275
;
public
static
final
int
AvatarPropNotify
=
1279
;
public
static
final
int
AvatarSatiationDataNotify
=
1639
;
public
static
final
int
AvatarSkillChangeNotify
=
1088
;
public
static
final
int
AvatarSkillDepotChangeNotify
=
1015
;
public
static
final
int
AvatarSkillInfoNotify
=
1045
;
public
static
final
int
AvatarSkillMaxChargeCountNotify
=
1044
;
public
static
final
int
AvatarSkillUpgradeReq
=
1091
;
public
static
final
int
AvatarSkillUpgradeRsp
=
1097
;
public
static
final
int
AvatarTeamUpdateNotify
=
1649
;
public
static
final
int
AvatarUnlockTalentNotify
=
1010
;
public
static
final
int
AvatarUpgradeReq
=
1660
;
public
static
final
int
AvatarUpgradeRsp
=
1735
;
public
static
final
int
AvatarWearFlycloakReq
=
1677
;
public
static
final
int
AvatarWearFlycloakRsp
=
1782
;
public
static
final
int
BackMyWorldReq
=
219
;
public
static
final
int
BackMyWorldRsp
=
269
;
public
static
final
int
BargainOfferPriceReq
=
409
;
public
static
final
int
BargainOfferPriceRsp
=
465
;
public
static
final
int
BargainStartNotify
=
489
;
public
static
final
int
BargainTerminateNotify
=
403
;
public
static
final
int
BattlePassAllDataNotify
=
2635
;
public
static
final
int
BattlePassBuySuccNotify
=
2612
;
public
static
final
int
BattlePassCurScheduleUpdateNotify
=
2648
;
public
static
final
int
BattlePassMissionDelNotify
=
2645
;
public
static
final
int
BattlePassMissionUpdateNotify
=
2625
;
public
static
final
int
BeginCameraSceneLookNotify
=
261
;
public
static
final
int
BigTalentPointConvertReq
=
1037
;
public
static
final
int
BigTalentPointConvertRsp
=
1093
;
public
static
final
int
BlessingAcceptAllGivePicReq
=
2176
;
public
static
final
int
BlessingAcceptAllGivePicRsp
=
2050
;
public
static
final
int
BlessingAcceptGivePicReq
=
2134
;
public
static
final
int
BlessingAcceptGivePicRsp
=
2117
;
public
static
final
int
BlessingGetAllRecvPicRecordListReq
=
2090
;
public
static
final
int
BlessingGetAllRecvPicRecordListRsp
=
2140
;
public
static
final
int
BlessingGetFriendPicListReq
=
2077
;
public
static
final
int
BlessingGetFriendPicListRsp
=
2182
;
public
static
final
int
BlessingGiveFriendPicReq
=
2161
;
public
static
final
int
BlessingGiveFriendPicRsp
=
2076
;
public
static
final
int
BlessingRecvFriendPicNotify
=
2184
;
public
static
final
int
BlessingRedeemRewardReq
=
2172
;
public
static
final
int
BlessingRedeemRewardRsp
=
2039
;
public
static
final
int
BlessingScanReq
=
2186
;
public
static
final
int
BlessingScanRsp
=
2007
;
public
static
final
int
BlossomBriefInfoNotify
=
2710
;
public
static
final
int
BlossomChestCreateNotify
=
2793
;
public
static
final
int
BlossomChestInfoNotify
=
845
;
public
static
final
int
BonusActivityInfoReq
=
2597
;
public
static
final
int
BonusActivityInfoRsp
=
2588
;
public
static
final
int
BonusActivityUpdateNotify
=
2591
;
public
static
final
int
BossChestActivateNotify
=
844
;
public
static
final
int
BuyBattlePassLevelReq
=
2639
;
public
static
final
int
BuyBattlePassLevelRsp
=
2621
;
public
static
final
int
BuyGoodsReq
=
710
;
public
static
final
int
BuyGoodsRsp
=
715
;
public
static
final
int
BuyResinReq
=
630
;
public
static
final
int
BuyResinRsp
=
647
;
public
static
final
int
CalcWeaponUpgradeReturnItemsReq
=
643
;
public
static
final
int
CalcWeaponUpgradeReturnItemsRsp
=
686
;
public
static
final
int
CanUseSkillNotify
=
1055
;
public
static
final
int
CancelCityReputationRequestReq
=
2834
;
public
static
final
int
CancelCityReputationRequestRsp
=
2879
;
public
static
final
int
CancelCoopTaskReq
=
1989
;
public
static
final
int
CancelCoopTaskRsp
=
1971
;
public
static
final
int
CancelFinishParentQuestNotify
=
492
;
public
static
final
int
CardProductRewardNotify
=
4148
;
public
static
final
int
ChallengeDataNotify
=
983
;
public
static
final
int
ChallengeRecordNotify
=
909
;
public
static
final
int
ChangeAvatarReq
=
1743
;
public
static
final
int
ChangeAvatarRsp
=
1672
;
public
static
final
int
ChangeGameTimeReq
=
175
;
public
static
final
int
ChangeGameTimeRsp
=
134
;
public
static
final
int
ChangeMailStarNotify
=
1497
;
public
static
final
int
ChangeMpTeamAvatarReq
=
1794
;
public
static
final
int
ChangeMpTeamAvatarRsp
=
1629
;
public
static
final
int
ChangeTeamNameReq
=
1793
;
public
static
final
int
ChangeTeamNameRsp
=
1707
;
public
static
final
int
ChangeWorldToSingleModeNotify
=
3293
;
public
static
final
int
ChangeWorldToSingleModeReq
=
3174
;
public
static
final
int
ChangeWorldToSingleModeRsp
=
3308
;
public
static
final
int
ChapterStateNotify
=
455
;
public
static
final
int
ChatChannelDataNotify
=
5047
;
public
static
final
int
ChatChannelUpdateNotify
=
5041
;
public
static
final
int
ChatHistoryNotify
=
3265
;
public
static
final
int
CheckSegmentCRCNotify
=
56
;
public
static
final
int
CheckSegmentCRCReq
=
83
;
public
static
final
int
ChooseCurAvatarTeamReq
=
1713
;
public
static
final
int
ChooseCurAvatarTeamRsp
=
1608
;
public
static
final
int
CityReputationDataNotify
=
2855
;
public
static
final
int
CityReputationLevelupNotify
=
2837
;
public
static
final
int
ClientAIStateNotify
=
1128
;
public
static
final
int
ClientAbilitiesInitFinishCombineNotify
=
1144
;
public
static
final
int
ClientAbilityChangeNotify
=
1191
;
public
static
final
int
ClientAbilityInitBeginNotify
=
1110
;
public
static
final
int
ClientAbilityInitFinishNotify
=
1115
;
public
static
final
int
ClientCollectorDataNotify
=
4262
;
public
static
final
int
ClientLockGameTimeNotify
=
194
;
public
static
final
int
ClientNewMailNotify
=
1434
;
public
static
final
int
ClientPauseNotify
=
278
;
public
static
final
int
ClientReconnectNotify
=
91
;
public
static
final
int
ClientReportNotify
=
28
;
public
static
final
int
ClientScriptEventNotify
=
218
;
public
static
final
int
ClientTransmitReq
=
252
;
public
static
final
int
ClientTransmitRsp
=
292
;
public
static
final
int
ClientTriggerEventNotify
=
197
;
public
static
final
int
CloseCommonTipsNotify
=
3187
;
public
static
final
int
CodexDataFullNotify
=
4204
;
public
static
final
int
CodexDataUpdateNotify
=
4205
;
public
static
final
int
CombatInvocationsNotify
=
347
;
public
static
final
int
CombineDataNotify
=
649
;
public
static
final
int
CombineFormulaDataNotify
=
685
;
public
static
final
int
CombineReq
=
663
;
public
static
final
int
CombineRsp
=
608
;
public
static
final
int
CompoundDataNotify
=
181
;
public
static
final
int
CookDataNotify
=
164
;
public
static
final
int
CookGradeDataNotify
=
166
;
public
static
final
int
CookRecipeDataNotify
=
101
;
public
static
final
int
CoopCgShowNotify
=
1983
;
public
static
final
int
CoopCgUpdateNotify
=
1993
;
public
static
final
int
CoopChapterUpdateNotify
=
1986
;
public
static
final
int
CoopDataNotify
=
1967
;
public
static
final
int
CoopPointUpdateNotify
=
1987
;
public
static
final
int
CoopProgressUpdateNotify
=
2000
;
public
static
final
int
CoopRewardUpdateNotify
=
1976
;
public
static
final
int
CreateMassiveEntityNotify
=
336
;
public
static
final
int
CreateMassiveEntityReq
=
323
;
public
static
final
int
CreateMassiveEntityRsp
=
313
;
public
static
final
int
CutSceneBeginNotify
=
241
;
public
static
final
int
CutSceneEndNotify
=
214
;
public
static
final
int
CutSceneFinishNotify
=
248
;
public
static
final
int
DailyTaskDataNotify
=
124
;
public
static
final
int
DailyTaskProgressNotify
=
161
;
public
static
final
int
DailyTaskScoreRewardNotify
=
138
;
public
static
final
int
DataResVersionNotify
=
136
;
public
static
final
int
DealAddFriendReq
=
4044
;
public
static
final
int
DealAddFriendRsp
=
4045
;
public
static
final
int
DelMailReq
=
1493
;
public
static
final
int
DelMailRsp
=
1444
;
public
static
final
int
DelScenePlayTeamEntityNotify
=
3117
;
public
static
final
int
DelTeamEntityNotify
=
330
;
public
static
final
int
DeleteFriendNotify
=
4083
;
public
static
final
int
DeleteFriendReq
=
4079
;
public
static
final
int
DeleteFriendRsp
=
4091
;
public
static
final
int
DestroyMassiveEntityNotify
=
324
;
public
static
final
int
DestroyMaterialReq
=
670
;
public
static
final
int
DestroyMaterialRsp
=
654
;
public
static
final
int
DoGachaReq
=
1510
;
public
static
final
int
DoGachaRsp
=
1515
;
public
static
final
int
DoSetPlayerBornDataNotify
=
174
;
public
static
final
int
DraftGuestReplyInviteNotify
=
5445
;
public
static
final
int
DraftGuestReplyInviteReq
=
5493
;
public
static
final
int
DraftGuestReplyInviteRsp
=
5444
;
public
static
final
int
DraftGuestReplyTwiceConfirmNotify
=
5488
;
public
static
final
int
DraftGuestReplyTwiceConfirmReq
=
5479
;
public
static
final
int
DraftGuestReplyTwiceConfirmRsp
=
5491
;
public
static
final
int
DraftInviteResultNotify
=
5475
;
public
static
final
int
DraftOwnerInviteNotify
=
5437
;
public
static
final
int
DraftOwnerStartInviteReq
=
5410
;
public
static
final
int
DraftOwnerStartInviteRsp
=
5415
;
public
static
final
int
DraftOwnerTwiceConfirmNotify
=
5434
;
public
static
final
int
DraftTwiceConfirmResultNotify
=
5497
;
public
static
final
int
DragonSpineChapterFinishNotify
=
2196
;
public
static
final
int
DragonSpineChapterOpenNotify
=
2070
;
public
static
final
int
DragonSpineChapterProgressChangeNotify
=
2001
;
public
static
final
int
DragonSpineCoinChangeNotify
=
2189
;
public
static
final
int
DropHintNotify
=
673
;
public
static
final
int
DropItemReq
=
634
;
public
static
final
int
DropItemRsp
=
679
;
public
static
final
int
DropSubfieldReq
=
232
;
public
static
final
int
DropSubfieldRsp
=
251
;
public
static
final
int
DungeonCandidateTeamChangeAvatarReq
=
958
;
public
static
final
int
DungeonCandidateTeamChangeAvatarRsp
=
923
;
public
static
final
int
DungeonCandidateTeamCreateReq
=
964
;
public
static
final
int
DungeonCandidateTeamCreateRsp
=
901
;
public
static
final
int
DungeonCandidateTeamDismissNotify
=
980
;
public
static
final
int
DungeonCandidateTeamInfoNotify
=
965
;
public
static
final
int
DungeonCandidateTeamInviteNotify
=
903
;
public
static
final
int
DungeonCandidateTeamInviteReq
=
966
;
public
static
final
int
DungeonCandidateTeamInviteRsp
=
973
;
public
static
final
int
DungeonCandidateTeamKickReq
=
963
;
public
static
final
int
DungeonCandidateTeamKickRsp
=
908
;
public
static
final
int
DungeonCandidateTeamLeaveReq
=
917
;
public
static
final
int
DungeonCandidateTeamLeaveRsp
=
981
;
public
static
final
int
DungeonCandidateTeamPlayerLeaveNotify
=
920
;
public
static
final
int
DungeonCandidateTeamRefuseNotify
=
967
;
public
static
final
int
DungeonCandidateTeamReplyInviteReq
=
927
;
public
static
final
int
DungeonCandidateTeamReplyInviteRsp
=
902
;
public
static
final
int
DungeonCandidateTeamSetReadyReq
=
952
;
public
static
final
int
DungeonCandidateTeamSetReadyRsp
=
992
;
public
static
final
int
DungeonChallengeBeginNotify
=
974
;
public
static
final
int
DungeonChallengeFinishNotify
=
956
;
public
static
final
int
DungeonDataNotify
=
946
;
public
static
final
int
DungeonDieOptionReq
=
991
;
public
static
final
int
DungeonDieOptionRsp
=
997
;
public
static
final
int
DungeonEntryInfoReq
=
960
;
public
static
final
int
DungeonEntryInfoRsp
=
933
;
public
static
final
int
DungeonEntryToBeExploreNotify
=
3067
;
public
static
final
int
DungeonFollowNotify
=
926
;
public
static
final
int
DungeonGetStatueDropReq
=
962
;
public
static
final
int
DungeonGetStatueDropRsp
=
989
;
public
static
final
int
DungeonInterruptChallengeReq
=
938
;
public
static
final
int
DungeonInterruptChallengeRsp
=
930
;
public
static
final
int
DungeonPlayerDieNotify
=
979
;
public
static
final
int
DungeonPlayerDieReq
=
928
;
public
static
final
int
DungeonPlayerDieRsp
=
955
;
public
static
final
int
DungeonRestartInviteNotify
=
984
;
public
static
final
int
DungeonRestartInviteReplyNotify
=
972
;
public
static
final
int
DungeonRestartInviteReplyReq
=
912
;
public
static
final
int
DungeonRestartInviteReplyRsp
=
953
;
public
static
final
int
DungeonRestartReq
=
932
;
public
static
final
int
DungeonRestartResultNotify
=
970
;
public
static
final
int
DungeonRestartRsp
=
951
;
public
static
final
int
DungeonSettleNotify
=
934
;
public
static
final
int
DungeonShowReminderNotify
=
988
;
public
static
final
int
DungeonSlipRevivePointActivateReq
=
924
;
public
static
final
int
DungeonSlipRevivePointActivateRsp
=
961
;
public
static
final
int
DungeonWayPointActivateReq
=
945
;
public
static
final
int
DungeonWayPointActivateRsp
=
975
;
public
static
final
int
DungeonWayPointNotify
=
944
;
public
static
final
int
EchoNotify
=
62
;
public
static
final
int
EffigyChallengeInfoNotify
=
2159
;
public
static
final
int
EffigyChallengeResultNotify
=
2024
;
public
static
final
int
EndCameraSceneLookNotify
=
238
;
public
static
final
int
EnterMechanicusDungeonReq
=
3979
;
public
static
final
int
EnterMechanicusDungeonRsp
=
3991
;
public
static
final
int
EnterSceneDoneReq
=
268
;
public
static
final
int
EnterSceneDoneRsp
=
290
;
public
static
final
int
EnterScenePeerNotify
=
282
;
public
static
final
int
EnterSceneReadyReq
=
298
;
public
static
final
int
EnterSceneReadyRsp
=
296
;
public
static
final
int
EnterSceneWeatherAreaNotify
=
258
;
public
static
final
int
EnterTransPointRegionNotify
=
255
;
public
static
final
int
EnterTrialAvatarActivityDungeonReq
=
2031
;
public
static
final
int
EnterTrialAvatarActivityDungeonRsp
=
2175
;
public
static
final
int
EnterWorldAreaReq
=
273
;
public
static
final
int
EnterWorldAreaRsp
=
263
;
public
static
final
int
EntityAiKillSelfNotify
=
370
;
public
static
final
int
EntityAiSyncNotify
=
312
;
public
static
final
int
EntityAuthorityChangeNotify
=
303
;
public
static
final
int
EntityConfigHashNotify
=
3458
;
public
static
final
int
EntityFightPropChangeReasonNotify
=
1244
;
public
static
final
int
EntityFightPropNotify
=
1210
;
public
static
final
int
EntityFightPropUpdateNotify
=
1215
;
public
static
final
int
EntityForceSyncReq
=
208
;
public
static
final
int
EntityForceSyncRsp
=
217
;
public
static
final
int
EntityJumpNotify
=
226
;
public
static
final
int
EntityMoveRoomNotify
=
3135
;
public
static
final
int
EntityPropNotify
=
1260
;
public
static
final
int
EntityTagChangeNotify
=
3262
;
public
static
final
int
EvtAiSyncCombatThreatInfoNotify
=
351
;
public
static
final
int
EvtAiSyncSkillCdNotify
=
317
;
public
static
final
int
EvtAnimatorParameterNotify
=
333
;
public
static
final
int
EvtAnimatorStateChangedNotify
=
379
;
public
static
final
int
EvtAvatarEnterFocusNotify
=
389
;
public
static
final
int
EvtAvatarExitFocusNotify
=
309
;
public
static
final
int
EvtAvatarSitDownNotify
=
392
;
public
static
final
int
EvtAvatarStandUpNotify
=
358
;
public
static
final
int
EvtAvatarUpdateFocusNotify
=
365
;
public
static
final
int
EvtBeingHitNotify
=
360
;
public
static
final
int
EvtBeingHitsCombineNotify
=
381
;
public
static
final
int
EvtBulletDeactiveNotify
=
388
;
public
static
final
int
EvtBulletHitNotify
=
397
;
public
static
final
int
EvtBulletMoveNotify
=
362
;
public
static
final
int
EvtCostStaminaNotify
=
375
;
public
static
final
int
EvtCreateGadgetNotify
=
337
;
public
static
final
int
EvtDestroyGadgetNotify
=
393
;
public
static
final
int
EvtDestroyServerGadgetNotify
=
372
;
public
static
final
int
EvtDoSkillSuccNotify
=
315
;
public
static
final
int
EvtEntityRenderersChangedNotify
=
363
;
public
static
final
int
EvtEntityStartDieEndNotify
=
328
;
public
static
final
int
EvtFaceToDirNotify
=
345
;
public
static
final
int
EvtFaceToEntityNotify
=
344
;
public
static
final
int
EvtRushMoveNotify
=
391
;
public
static
final
int
EvtSetAttackTargetNotify
=
334
;
public
static
final
int
ExecuteGadgetLuaReq
=
231
;
public
static
final
int
ExecuteGadgetLuaRsp
=
240
;
public
static
final
int
ExecuteGroupTriggerReq
=
284
;
public
static
final
int
ExecuteGroupTriggerRsp
=
212
;
public
static
final
int
ExitSceneWeatherAreaNotify
=
223
;
public
static
final
int
ExitTransPointRegionNotify
=
246
;
public
static
final
int
ExpeditionChallengeEnterRegionNotify
=
2095
;
public
static
final
int
ExpeditionChallengeFinishedNotify
=
2197
;
public
static
final
int
ExpeditionRecallReq
=
2114
;
public
static
final
int
ExpeditionRecallRsp
=
2108
;
public
static
final
int
ExpeditionStartReq
=
2032
;
public
static
final
int
ExpeditionStartRsp
=
2148
;
public
static
final
int
ExpeditionTakeRewardReq
=
2053
;
public
static
final
int
ExpeditionTakeRewardRsp
=
2181
;
public
static
final
int
FinishDeliveryNotify
=
2126
;
public
static
final
int
FinishMainCoopReq
=
1963
;
public
static
final
int
FinishMainCoopRsp
=
1951
;
public
static
final
int
FinishedParentQuestNotify
=
415
;
public
static
final
int
FinishedParentQuestUpdateNotify
=
437
;
public
static
final
int
FleurFairBalloonSettleNotify
=
2192
;
public
static
final
int
FleurFairBuffEnergyNotify
=
5392
;
public
static
final
int
FleurFairFallSettleNotify
=
2015
;
public
static
final
int
FleurFairFinishGalleryStageNotify
=
5323
;
public
static
final
int
FleurFairMusicGameSettleReq
=
2064
;
public
static
final
int
FleurFairMusicGameSettleRsp
=
2040
;
public
static
final
int
FleurFairMusicGameStartReq
=
2105
;
public
static
final
int
FleurFairMusicGameStartRsp
=
2179
;
public
static
final
int
FleurFairReplayMiniGameReq
=
2146
;
public
static
final
int
FleurFairReplayMiniGameRsp
=
2089
;
public
static
final
int
FleurFairStageSettleNotify
=
5358
;
public
static
final
int
FlightActivityRestartReq
=
2073
;
public
static
final
int
FlightActivityRestartRsp
=
2045
;
public
static
final
int
FlightActivitySettleNotify
=
2195
;
public
static
final
int
FocusAvatarReq
=
1710
;
public
static
final
int
FocusAvatarRsp
=
1772
;
public
static
final
int
ForceAddPlayerFriendReq
=
4084
;
public
static
final
int
ForceAddPlayerFriendRsp
=
4012
;
public
static
final
int
ForceDragAvatarNotify
=
3056
;
public
static
final
int
ForceDragBackTransferNotify
=
3171
;
public
static
final
int
ForgeDataNotify
=
677
;
public
static
final
int
ForgeFormulaDataNotify
=
625
;
public
static
final
int
ForgeGetQueueDataReq
=
681
;
public
static
final
int
ForgeGetQueueDataRsp
=
627
;
public
static
final
int
ForgeQueueDataNotify
=
617
;
public
static
final
int
ForgeQueueManipulateReq
=
692
;
public
static
final
int
ForgeQueueManipulateRsp
=
658
;
public
static
final
int
ForgeStartReq
=
602
;
public
static
final
int
ForgeStartRsp
=
652
;
public
static
final
int
FoundationNotify
=
874
;
public
static
final
int
FoundationReq
=
855
;
public
static
final
int
FoundationRsp
=
846
;
public
static
final
int
FunitureMakeMakeInfoChangeNotify
=
4523
;
public
static
final
int
FurnitureCurModuleArrangeCountNotify
=
4770
;
public
static
final
int
FurnitureMakeBeHelpedNotify
=
4825
;
public
static
final
int
FurnitureMakeCancelReq
=
4495
;
public
static
final
int
FurnitureMakeCancelRsp
=
4814
;
public
static
final
int
FurnitureMakeFinishNotify
=
4707
;
public
static
final
int
FurnitureMakeHelpReq
=
4779
;
public
static
final
int
FurnitureMakeHelpRsp
=
4455
;
public
static
final
int
FurnitureMakeReq
=
4885
;
public
static
final
int
FurnitureMakeRsp
=
4819
;
public
static
final
int
FurnitureMakeStartReq
=
4518
;
public
static
final
int
FurnitureMakeStartRsp
=
4521
;
public
static
final
int
GMShowNavMeshReq
=
2384
;
public
static
final
int
GMShowNavMeshRsp
=
2312
;
public
static
final
int
GMShowObstacleReq
=
2332
;
public
static
final
int
GMShowObstacleRsp
=
2351
;
public
static
final
int
GadgetAutoPickDropInfoNotify
=
888
;
public
static
final
int
GadgetGeneralRewardInfoNotify
=
897
;
public
static
final
int
GadgetInteractReq
=
860
;
public
static
final
int
GadgetInteractRsp
=
833
;
public
static
final
int
GadgetPlayDataNotify
=
879
;
public
static
final
int
GadgetPlayStartNotify
=
875
;
public
static
final
int
GadgetPlayStopNotify
=
834
;
public
static
final
int
GadgetPlayUidOpNotify
=
891
;
public
static
final
int
GadgetStateNotify
=
810
;
public
static
final
int
GadgetTalkChangeNotify
=
856
;
public
static
final
int
GalleryBalloonScoreNotify
=
5510
;
public
static
final
int
GalleryBalloonShootNotify
=
5533
;
public
static
final
int
GalleryBrokenFloorFallNotify
=
5591
;
public
static
final
int
GalleryBulletHitNotify
=
5579
;
public
static
final
int
GalleryFallCatchNotify
=
5537
;
public
static
final
int
GalleryFallScoreNotify
=
5593
;
public
static
final
int
GalleryFlowerCatchNotify
=
5575
;
public
static
final
int
GalleryPreStartNotify
=
5534
;
public
static
final
int
GalleryStartNotify
=
5560
;
public
static
final
int
GalleryStopNotify
=
5515
;
public
static
final
int
GetActivityInfoReq
=
2011
;
public
static
final
int
GetActivityInfoRsp
=
2170
;
public
static
final
int
GetActivityScheduleReq
=
2663
;
public
static
final
int
GetActivityScheduleRsp
=
2651
;
public
static
final
int
GetActivityShopSheetInfoReq
=
744
;
public
static
final
int
GetActivityShopSheetInfoRsp
=
745
;
public
static
final
int
GetAllActivatedBargainDataReq
=
480
;
public
static
final
int
GetAllActivatedBargainDataRsp
=
464
;
public
static
final
int
GetAllH5ActivityInfoReq
=
5675
;
public
static
final
int
GetAllMailReq
=
1479
;
public
static
final
int
GetAllMailRsp
=
1491
;
public
static
final
int
GetAllSceneGalleryInfoReq
=
5544
;
public
static
final
int
GetAllSceneGalleryInfoRsp
=
5545
;
public
static
final
int
GetAllUnlockNameCardReq
=
4065
;
public
static
final
int
GetAllUnlockNameCardRsp
=
4003
;
public
static
final
int
GetAreaExplorePointReq
=
227
;
public
static
final
int
GetAreaExplorePointRsp
=
202
;
public
static
final
int
GetAuthSalesmanInfoReq
=
2082
;
public
static
final
int
GetAuthSalesmanInfoRsp
=
2173
;
public
static
final
int
GetAuthkeyReq
=
1445
;
public
static
final
int
GetAuthkeyRsp
=
1475
;
public
static
final
int
GetBargainDataReq
=
467
;
public
static
final
int
GetBargainDataRsp
=
420
;
public
static
final
int
GetBattlePassProductReq
=
2643
;
public
static
final
int
GetBattlePassProductRsp
=
2626
;
public
static
final
int
GetBlossomBriefInfoListReq
=
2760
;
public
static
final
int
GetBlossomBriefInfoListRsp
=
2733
;
public
static
final
int
GetBonusActivityRewardReq
=
2528
;
public
static
final
int
GetBonusActivityRewardRsp
=
2555
;
public
static
final
int
GetCityHuntingOfferReq
=
4456
;
public
static
final
int
GetCityHuntingOfferRsp
=
4747
;
public
static
final
int
GetCityReputationInfoReq
=
2860
;
public
static
final
int
GetCityReputationInfoRsp
=
2833
;
public
static
final
int
GetCityReputationMapInfoReq
=
2891
;
public
static
final
int
GetCityReputationMapInfoRsp
=
2897
;
public
static
final
int
GetCompoundDataReq
=
127
;
public
static
final
int
GetCompoundDataRsp
=
102
;
public
static
final
int
GetDailyDungeonEntryInfoReq
=
913
;
public
static
final
int
GetDailyDungeonEntryInfoRsp
=
936
;
public
static
final
int
GetDungeonEntryExploreConditionReq
=
3208
;
public
static
final
int
GetDungeonEntryExploreConditionRsp
=
3391
;
public
static
final
int
GetExpeditionAssistInfoListReq
=
2124
;
public
static
final
int
GetExpeditionAssistInfoListRsp
=
2168
;
public
static
final
int
GetFriendShowAvatarInfoReq
=
4061
;
public
static
final
int
GetFriendShowAvatarInfoRsp
=
4038
;
public
static
final
int
GetFriendShowNameCardInfoReq
=
4032
;
public
static
final
int
GetFriendShowNameCardInfoRsp
=
4051
;
public
static
final
int
GetFurnitureCurModuleArrangeCountReq
=
4618
;
public
static
final
int
GetGachaInfoReq
=
1560
;
public
static
final
int
GetGachaInfoRsp
=
1533
;
public
static
final
int
GetHomeLevelUpRewardReq
=
4508
;
public
static
final
int
GetHomeLevelUpRewardRsp
=
4864
;
public
static
final
int
GetHuntingOfferRewardReq
=
4769
;
public
static
final
int
GetHuntingOfferRewardRsp
=
4860
;
public
static
final
int
GetInvestigationMonsterReq
=
1928
;
public
static
final
int
GetInvestigationMonsterRsp
=
1921
;
public
static
final
int
GetMailItemReq
=
1415
;
public
static
final
int
GetMailItemRsp
=
1437
;
public
static
final
int
GetMapMarkTipsReq
=
3307
;
public
static
final
int
GetMapMarkTipsRsp
=
3040
;
public
static
final
int
GetMechanicusInfoReq
=
3960
;
public
static
final
int
GetMechanicusInfoRsp
=
3933
;
public
static
final
int
GetNextResourceInfoReq
=
139
;
public
static
final
int
GetNextResourceInfoRsp
=
187
;
public
static
final
int
GetOnlinePlayerInfoReq
=
46
;
public
static
final
int
GetOnlinePlayerInfoRsp
=
74
;
public
static
final
int
GetOnlinePlayerListReq
=
45
;
public
static
final
int
GetOnlinePlayerListRsp
=
75
;
public
static
final
int
GetOpActivityInfoReq
=
5160
;
public
static
final
int
GetOpActivityInfoRsp
=
5133
;
public
static
final
int
GetPlayerAskFriendListRsp
=
4035
;
public
static
final
int
GetPlayerBlacklistReq
=
4002
;
public
static
final
int
GetPlayerBlacklistRsp
=
4052
;
public
static
final
int
GetPlayerFriendListReq
=
4060
;
public
static
final
int
GetPlayerFriendListRsp
=
4033
;
public
static
final
int
GetPlayerHomeCompInfoReq
=
4540
;
public
static
final
int
GetPlayerMpModeAvailabilityReq
=
1843
;
public
static
final
int
GetPlayerMpModeAvailabilityRsp
=
1826
;
public
static
final
int
GetPlayerSocialDetailReq
=
4075
;
public
static
final
int
GetPlayerSocialDetailRsp
=
4034
;
public
static
final
int
GetPlayerTokenReq
=
160
;
public
static
final
int
GetPlayerTokenRsp
=
133
;
public
static
final
int
GetPushTipsRewardReq
=
2265
;
public
static
final
int
GetPushTipsRewardRsp
=
2203
;
public
static
final
int
GetQuestTalkHistoryReq
=
445
;
public
static
final
int
GetQuestTalkHistoryRsp
=
475
;
public
static
final
int
GetRecentMpPlayerListReq
=
4066
;
public
static
final
int
GetRecentMpPlayerListRsp
=
4073
;
public
static
final
int
GetRegionSearchReq
=
5613
;
public
static
final
int
GetReunionMissionInfoReq
=
5093
;
public
static
final
int
GetReunionMissionInfoRsp
=
5076
;
public
static
final
int
GetReunionPrivilegeInfoReq
=
5089
;
public
static
final
int
GetReunionPrivilegeInfoRsp
=
5071
;
public
static
final
int
GetReunionSignInInfoReq
=
5063
;
public
static
final
int
GetReunionSignInInfoRsp
=
5051
;
public
static
final
int
GetSceneAreaReq
=
262
;
public
static
final
int
GetSceneAreaRsp
=
289
;
public
static
final
int
GetSceneNpcPositionReq
=
515
;
public
static
final
int
GetSceneNpcPositionRsp
=
537
;
public
static
final
int
GetScenePerformanceReq
=
3217
;
public
static
final
int
GetScenePerformanceRsp
=
3319
;
public
static
final
int
GetScenePointReq
=
288
;
public
static
final
int
GetScenePointRsp
=
228
;
public
static
final
int
GetShopReq
=
760
;
public
static
final
int
GetShopRsp
=
733
;
public
static
final
int
GetShopmallDataReq
=
737
;
public
static
final
int
GetShopmallDataRsp
=
793
;
public
static
final
int
GetSignInRewardReq
=
2537
;
public
static
final
int
GetSignInRewardRsp
=
2593
;
public
static
final
int
GetWidgetSlotReq
=
4258
;
public
static
final
int
GetWidgetSlotRsp
=
4294
;
public
static
final
int
GetWorldMpInfoReq
=
3439
;
public
static
final
int
GetWorldMpInfoRsp
=
3424
;
public
static
final
int
GivingRecordChangeNotify
=
172
;
public
static
final
int
GivingRecordNotify
=
153
;
public
static
final
int
GmTalkReq
=
33
;
public
static
final
int
GmTalkRsp
=
10
;
public
static
final
int
GrantRewardNotify
=
680
;
public
static
final
int
GroupSuiteNotify
=
3368
;
public
static
final
int
GroupUnloadNotify
=
3019
;
public
static
final
int
H5ActivityIdsNotify
=
5695
;
public
static
final
int
HideAndSeekPlayerReadyNotify
=
5330
;
public
static
final
int
HideAndSeekPlayerSetAvatarNotify
=
5347
;
public
static
final
int
HideAndSeekSelectAvatarReq
=
5313
;
public
static
final
int
HideAndSeekSelectAvatarRsp
=
5336
;
public
static
final
int
HideAndSeekSetReadyReq
=
5324
;
public
static
final
int
HideAndSeekSetReadyRsp
=
5361
;
public
static
final
int
HideAndSeekSettleNotify
=
5338
;
public
static
final
int
HitClientTrivialNotify
=
250
;
public
static
final
int
HitTreeNotify
=
3432
;
public
static
final
int
HomeBasicInfoNotify
=
4869
;
public
static
final
int
HomeBlockNotify
=
4784
;
public
static
final
int
HomeChangeEditModeReq
=
4483
;
public
static
final
int
HomeChangeEditModeRsp
=
4880
;
public
static
final
int
HomeChangeModuleReq
=
4604
;
public
static
final
int
HomeChangeModuleRsp
=
4631
;
public
static
final
int
HomeChooseModuleReq
=
4567
;
public
static
final
int
HomeChooseModuleRsp
=
4633
;
public
static
final
int
HomeComfortInfoNotify
=
4649
;
public
static
final
int
HomeGetArrangementInfoReq
=
4480
;
public
static
final
int
HomeGetArrangementInfoRsp
=
4781
;
public
static
final
int
HomeGetBasicInfoReq
=
4839
;
public
static
final
int
HomeGetOnlineStatusReq
=
4673
;
public
static
final
int
HomeGetOnlineStatusRsp
=
4626
;
public
static
final
int
HomeKickPlayerReq
=
4547
;
public
static
final
int
HomeKickPlayerRsp
=
4897
;
public
static
final
int
HomeLimitedShopBuyGoodsReq
=
4620
;
public
static
final
int
HomeLimitedShopBuyGoodsRsp
=
4667
;
public
static
final
int
HomeLimitedShopGoodsListReq
=
4706
;
public
static
final
int
HomeLimitedShopGoodsListRsp
=
4587
;
public
static
final
int
HomeLimitedShopInfoChangeNotify
=
4691
;
public
static
final
int
HomeLimitedShopInfoNotify
=
4679
;
public
static
final
int
HomeLimitedShopInfoReq
=
4715
;
public
static
final
int
HomeLimitedShopInfoRsp
=
4808
;
public
static
final
int
HomeResourceNotify
=
4513
;
public
static
final
int
HomeResourceTakeFetterExpReq
=
4884
;
public
static
final
int
HomeResourceTakeFetterExpRsp
=
4608
;
public
static
final
int
HomeResourceTakeHomeCoinReq
=
4812
;
public
static
final
int
HomeResourceTakeHomeCoinRsp
=
4481
;
public
static
final
int
HomeSceneJumpReq
=
4862
;
public
static
final
int
HomeSceneJumpRsp
=
4663
;
public
static
final
int
HomeUpdateArrangementInfoReq
=
4632
;
public
static
final
int
HomeUpdateArrangementInfoRsp
=
4820
;
public
static
final
int
HostPlayerNotify
=
310
;
public
static
final
int
HuntingFailNotify
=
4345
;
public
static
final
int
HuntingGiveUpReq
=
4313
;
public
static
final
int
HuntingGiveUpRsp
=
4301
;
public
static
final
int
HuntingOngoingNotify
=
4348
;
public
static
final
int
HuntingRevealClueNotify
=
4564
;
public
static
final
int
HuntingRevealFinalNotify
=
4335
;
public
static
final
int
HuntingStartNotify
=
4694
;
public
static
final
int
HuntingSuccessNotify
=
4325
;
public
static
final
int
InBattleMechanicusBuildingPointsNotify
=
5344
;
public
static
final
int
InBattleMechanicusCardResultNotify
=
5388
;
public
static
final
int
InBattleMechanicusConfirmCardNotify
=
5397
;
public
static
final
int
InBattleMechanicusConfirmCardReq
=
5379
;
public
static
final
int
InBattleMechanicusConfirmCardRsp
=
5391
;
public
static
final
int
InBattleMechanicusExcapeMonsterNotify
=
5337
;
public
static
final
int
InBattleMechanicusLeftMonsterNotify
=
5393
;
public
static
final
int
InBattleMechanicusPickCardNotify
=
5334
;
public
static
final
int
InBattleMechanicusPickCardReq
=
5345
;
public
static
final
int
InBattleMechanicusPickCardRsp
=
5375
;
public
static
final
int
InBattleMechanicusSettleNotify
=
5355
;
public
static
final
int
InteractDailyDungeonInfoNotify
=
947
;
public
static
final
int
InterruptGalleryReq
=
5597
;
public
static
final
int
InterruptGalleryRsp
=
5588
;
public
static
final
int
ItemAddHintNotify
=
637
;
public
static
final
int
ItemCdGroupTimeNotify
=
666
;
public
static
final
int
ItemExceedLimitNotify
=
639
;
public
static
final
int
ItemGivingReq
=
170
;
public
static
final
int
ItemGivingRsp
=
154
;
public
static
final
int
JoinHomeWorldFailNotify
=
4502
;
public
static
final
int
JoinPlayerFailNotify
=
295
;
public
static
final
int
JoinPlayerSceneReq
=
239
;
public
static
final
int
JoinPlayerSceneRsp
=
287
;
public
static
final
int
KeepAliveNotify
=
60
;
public
static
final
int
LeaveSceneReq
=
233
;
public
static
final
int
LeaveSceneRsp
=
210
;
public
static
final
int
LevelupCityReq
=
253
;
public
static
final
int
LevelupCityRsp
=
272
;
public
static
final
int
LifeStateChangeNotify
=
1233
;
public
static
final
int
LoadActivityTerrainNotify
=
2152
;
public
static
final
int
LuaSetOptionNotify
=
353
;
public
static
final
int
MailChangeNotify
=
1433
;
public
static
final
int
MainCoopUpdateNotify
=
1975
;
public
static
final
int
MarkEntityInMinMapNotify
=
230
;
public
static
final
int
MarkMapReq
=
3053
;
public
static
final
int
MarkMapRsp
=
3139
;
public
static
final
int
MarkNewNotify
=
1291
;
public
static
final
int
MassiveEntityElementOpBatchNotify
=
384
;
public
static
final
int
MassiveEntityStateChangedNotify
=
361
;
public
static
final
int
MaterialDeleteReturnNotify
=
632
;
public
static
final
int
MaterialDeleteUpdateNotify
=
612
;
public
static
final
int
McoinExchangeHcoinReq
=
653
;
public
static
final
int
McoinExchangeHcoinRsp
=
672
;
public
static
final
int
MechanicusCandidateTeamCreateReq
=
3928
;
public
static
final
int
MechanicusCandidateTeamCreateRsp
=
3955
;
public
static
final
int
MechanicusCloseNotify
=
3993
;
public
static
final
int
MechanicusCoinNotify
=
3915
;
public
static
final
int
MechanicusLevelupGearReq
=
3975
;
public
static
final
int
MechanicusLevelupGearRsp
=
3934
;
public
static
final
int
MechanicusOpenNotify
=
3937
;
public
static
final
int
MechanicusSequenceOpenNotify
=
3910
;
public
static
final
int
MechanicusUnlockGearReq
=
3944
;
public
static
final
int
MechanicusUnlockGearRsp
=
3945
;
public
static
final
int
MeetNpcReq
=
544
;
public
static
final
int
MeetNpcRsp
=
545
;
public
static
final
int
MetNpcIdListNotify
=
593
;
public
static
final
int
MiracleRingDataNotify
=
5245
;
public
static
final
int
MiracleRingDeliverItemReq
=
5217
;
public
static
final
int
MiracleRingDeliverItemRsp
=
5236
;
public
static
final
int
MiracleRingDestroyNotify
=
5243
;
public
static
final
int
MiracleRingDropResultNotify
=
5201
;
public
static
final
int
MiracleRingTakeRewardReq
=
5248
;
public
static
final
int
MiracleRingTakeRewardRsp
=
5213
;
public
static
final
int
MonsterAIConfigHashNotify
=
3024
;
public
static
final
int
MonsterAlertChangeNotify
=
380
;
public
static
final
int
MonsterForceAlertNotify
=
364
;
public
static
final
int
MonsterPointArrayRouteUpdateNotify
=
3292
;
public
static
final
int
MonsterSummonTagNotify
=
1360
;
public
static
final
int
MpBlockNotify
=
1824
;
public
static
final
int
MpPlayGuestReplyInviteReq
=
1850
;
public
static
final
int
MpPlayGuestReplyInviteRsp
=
1822
;
public
static
final
int
MpPlayGuestReplyNotify
=
1802
;
public
static
final
int
MpPlayInviteResultNotify
=
1830
;
public
static
final
int
MpPlayOwnerCheckReq
=
1812
;
public
static
final
int
MpPlayOwnerCheckRsp
=
1839
;
public
static
final
int
MpPlayOwnerInviteNotify
=
1831
;
public
static
final
int
MpPlayOwnerStartInviteReq
=
1821
;
public
static
final
int
MpPlayOwnerStartInviteRsp
=
1846
;
public
static
final
int
MpPlayPrepareInterruptNotify
=
1838
;
public
static
final
int
MpPlayPrepareNotify
=
1833
;
public
static
final
int
MultistagePlayEndNotify
=
5307
;
public
static
final
int
MultistagePlayFinishStageReq
=
5333
;
public
static
final
int
MultistagePlayFinishStageRsp
=
5328
;
public
static
final
int
MultistagePlayInfoNotify
=
5360
;
public
static
final
int
MultistagePlayStageEndNotify
=
5321
;
public
static
final
int
NavMeshStatsNotify
=
2353
;
public
static
final
int
NormalUidOpNotify
=
5735
;
public
static
final
int
NpcTalkReq
=
560
;
public
static
final
int
NpcTalkRsp
=
533
;
public
static
final
int
ObstacleModifyNotify
=
2310
;
public
static
final
int
OneoffGatherPointDetectorDataNotify
=
4289
;
public
static
final
int
OpActivityDataNotify
=
5110
;
public
static
final
int
OpActivityStateNotify
=
2560
;
public
static
final
int
OpActivityUpdateNotify
=
5115
;
public
static
final
int
OpenBlossomCircleCampGuideNotify
=
2744
;
public
static
final
int
OpenStateChangeNotify
=
165
;
public
static
final
int
OpenStateUpdateNotify
=
109
;
public
static
final
int
OrderDisplayNotify
=
4101
;
public
static
final
int
OrderFinishNotify
=
4145
;
public
static
final
int
PSPlayerApplyEnterMpReq
=
1837
;
public
static
final
int
PSPlayerApplyEnterMpRsp
=
1806
;
public
static
final
int
PathfindingEnterSceneReq
=
2337
;
public
static
final
int
PathfindingEnterSceneRsp
=
2393
;
public
static
final
int
PathfindingPingNotify
=
2315
;
public
static
final
int
PersonalLineAllDataReq
=
408
;
public
static
final
int
PersonalLineAllDataRsp
=
417
;
public
static
final
int
PersonalSceneJumpReq
=
286
;
public
static
final
int
PersonalSceneJumpRsp
=
277
;
public
static
final
int
PingReq
=
37
;
public
static
final
int
PingRsp
=
93
;
public
static
final
int
PlatformChangeRouteNotify
=
257
;
public
static
final
int
PlatformStartRouteNotify
=
254
;
public
static
final
int
PlatformStopRouteNotify
=
235
;
public
static
final
int
PlayerAllowEnterMpAfterAgreeMatchNotify
=
4176
;
public
static
final
int
PlayerApplyEnterHomeNotify
=
4614
;
public
static
final
int
PlayerApplyEnterHomeResultNotify
=
4580
;
public
static
final
int
PlayerApplyEnterHomeResultReq
=
4603
;
public
static
final
int
PlayerApplyEnterHomeResultRsp
=
4849
;
public
static
final
int
PlayerApplyEnterMpAfterMatchAgreedNotify
=
4177
;
public
static
final
int
PlayerApplyEnterMpNotify
=
1835
;
public
static
final
int
PlayerApplyEnterMpReq
=
1825
;
public
static
final
int
PlayerApplyEnterMpResultNotify
=
1848
;
public
static
final
int
PlayerApplyEnterMpResultReq
=
1813
;
public
static
final
int
PlayerApplyEnterMpResultRsp
=
1801
;
public
static
final
int
PlayerApplyEnterMpRsp
=
1845
;
public
static
final
int
PlayerCancelMatchReq
=
4198
;
public
static
final
int
PlayerCancelMatchRsp
=
4163
;
public
static
final
int
PlayerChatCDNotify
=
3173
;
public
static
final
int
PlayerChatNotify
=
3485
;
public
static
final
int
PlayerChatReq
=
3403
;
public
static
final
int
PlayerChatRsp
=
3045
;
public
static
final
int
PlayerCompoundMaterialReq
=
173
;
public
static
final
int
PlayerCompoundMaterialRsp
=
163
;
public
static
final
int
PlayerConfirmMatchReq
=
4186
;
public
static
final
int
PlayerConfirmMatchRsp
=
4193
;
public
static
final
int
PlayerCookArgsReq
=
135
;
public
static
final
int
PlayerCookArgsRsp
=
157
;
public
static
final
int
PlayerCookReq
=
103
;
public
static
final
int
PlayerCookRsp
=
167
;
public
static
final
int
PlayerDataNotify
=
145
;
public
static
final
int
PlayerEnterDungeonReq
=
910
;
public
static
final
int
PlayerEnterDungeonRsp
=
915
;
public
static
final
int
PlayerEnterSceneInfoNotify
=
294
;
public
static
final
int
PlayerEnterSceneNotify
=
260
;
public
static
final
int
PlayerEyePointStateNotify
=
3461
;
public
static
final
int
PlayerForceExitReq
=
125
;
public
static
final
int
PlayerForceExitRsp
=
149
;
public
static
final
int
PlayerGameTimeNotify
=
179
;
public
static
final
int
PlayerGeneralMatchConfirmNotify
=
4156
;
public
static
final
int
PlayerGeneralMatchDismissNotify
=
4187
;
public
static
final
int
PlayerGetForceQuitBanInfoReq
=
4162
;
public
static
final
int
PlayerGetForceQuitBanInfoRsp
=
4189
;
public
static
final
int
PlayerHomeCompInfoNotify
=
4863
;
public
static
final
int
PlayerInjectFixNotify
=
185
;
public
static
final
int
PlayerInvestigationAllInfoNotify
=
1920
;
public
static
final
int
PlayerInvestigationNotify
=
1901
;
public
static
final
int
PlayerInvestigationTargetNotify
=
1919
;
public
static
final
int
PlayerLevelRewardUpdateNotify
=
112
;
public
static
final
int
PlayerLoginReq
=
110
;
public
static
final
int
PlayerLoginRsp
=
115
;
public
static
final
int
PlayerLogoutNotify
=
144
;
public
static
final
int
PlayerLogoutReq
=
137
;
public
static
final
int
PlayerLogoutRsp
=
193
;
public
static
final
int
PlayerLuaShellNotify
=
143
;
public
static
final
int
PlayerMatchAgreedResultNotify
=
4165
;
public
static
final
int
PlayerMatchInfoNotify
=
4195
;
public
static
final
int
PlayerMatchStopNotify
=
4151
;
public
static
final
int
PlayerMatchSuccNotify
=
4167
;
public
static
final
int
PlayerOfferingDataNotify
=
2915
;
public
static
final
int
PlayerOfferingReq
=
2914
;
public
static
final
int
PlayerOfferingRsp
=
2917
;
public
static
final
int
PlayerPreEnterMpNotify
=
1836
;
public
static
final
int
PlayerPropChangeNotify
=
156
;
public
static
final
int
PlayerPropChangeReasonNotify
=
1234
;
public
static
final
int
PlayerPropNotify
=
191
;
public
static
final
int
PlayerQuitDungeonReq
=
937
;
public
static
final
int
PlayerQuitDungeonRsp
=
993
;
public
static
final
int
PlayerQuitFromHomeNotify
=
4757
;
public
static
final
int
PlayerQuitFromMpNotify
=
1817
;
public
static
final
int
PlayerRandomCookReq
=
120
;
public
static
final
int
PlayerRandomCookRsp
=
180
;
public
static
final
int
PlayerRechargeDataNotify
=
4113
;
public
static
final
int
PlayerReportReq
=
4092
;
public
static
final
int
PlayerReportRsp
=
4058
;
public
static
final
int
PlayerRoutineDataNotify
=
3535
;
public
static
final
int
PlayerSetLanguageReq
=
123
;
public
static
final
int
PlayerSetLanguageRsp
=
113
;
public
static
final
int
PlayerSetOnlyMPWithPSPlayerReq
=
1815
;
public
static
final
int
PlayerSetOnlyMPWithPSPlayerRsp
=
1827
;
public
static
final
int
PlayerSetPauseReq
=
192
;
public
static
final
int
PlayerSetPauseRsp
=
158
;
public
static
final
int
PlayerStartMatchReq
=
4185
;
public
static
final
int
PlayerStartMatchRsp
=
4175
;
public
static
final
int
PlayerStoreNotify
=
660
;
public
static
final
int
PlayerTimeNotify
=
152
;
public
static
final
int
PostEnterSceneReq
=
3390
;
public
static
final
int
PostEnterSceneRsp
=
3213
;
public
static
final
int
PrivateChatNotify
=
4960
;
public
static
final
int
PrivateChatReq
=
5010
;
public
static
final
int
PrivateChatRsp
=
4983
;
public
static
final
int
PrivateChatSetSequenceReq
=
4965
;
public
static
final
int
PrivateChatSetSequenceRsp
=
4987
;
public
static
final
int
ProudSkillChangeNotify
=
1079
;
public
static
final
int
ProudSkillExtraLevelNotify
=
1028
;
public
static
final
int
ProudSkillUpgradeReq
=
1075
;
public
static
final
int
ProudSkillUpgradeRsp
=
1034
;
public
static
final
int
PullPrivateChatReq
=
5043
;
public
static
final
int
PullPrivateChatRsp
=
4994
;
public
static
final
int
PullRecentChatReq
=
4995
;
public
static
final
int
PullRecentChatRsp
=
5025
;
public
static
final
int
PushTipsAllDataNotify
=
2226
;
public
static
final
int
PushTipsChangeNotify
=
2262
;
public
static
final
int
PushTipsReadFinishReq
=
2289
;
public
static
final
int
PushTipsReadFinishRsp
=
2209
;
public
static
final
int
QueryCodexMonsterBeKilledNumReq
=
4207
;
public
static
final
int
QueryCodexMonsterBeKilledNumRsp
=
4208
;
public
static
final
int
QueryPathReq
=
2360
;
public
static
final
int
QueryPathRsp
=
2333
;
public
static
final
int
QuestCreateEntityReq
=
434
;
public
static
final
int
QuestCreateEntityRsp
=
479
;
public
static
final
int
QuestDelNotify
=
410
;
public
static
final
int
QuestDestroyEntityReq
=
491
;
public
static
final
int
QuestDestroyEntityRsp
=
497
;
public
static
final
int
QuestDestroyNpcReq
=
426
;
public
static
final
int
QuestDestroyNpcRsp
=
462
;
public
static
final
int
QuestGlobalVarNotify
=
466
;
public
static
final
int
QuestListNotify
=
460
;
public
static
final
int
QuestListUpdateNotify
=
433
;
public
static
final
int
QuestProgressUpdateNotify
=
446
;
public
static
final
int
QuestTransmitReq
=
473
;
public
static
final
int
QuestTransmitRsp
=
463
;
public
static
final
int
QuestUpdateQuestVarNotify
=
483
;
public
static
final
int
QuestUpdateQuestVarReq
=
474
;
public
static
final
int
QuestUpdateQuestVarRsp
=
456
;
public
static
final
int
QuickUseWidgetReq
=
4276
;
public
static
final
int
QuickUseWidgetRsp
=
4265
;
public
static
final
int
ReadMailNotify
=
1410
;
public
static
final
int
ReadPrivateChatReq
=
4984
;
public
static
final
int
ReadPrivateChatRsp
=
5029
;
public
static
final
int
ReceivedTrialAvatarActivityRewardReq
=
2020
;
public
static
final
int
ReceivedTrialAvatarActivityRewardRsp
=
2087
;
public
static
final
int
RechargeReq
=
4135
;
public
static
final
int
RechargeRsp
=
4125
;
public
static
final
int
RedeemLegendaryKeyReq
=
481
;
public
static
final
int
RedeemLegendaryKeyRsp
=
427
;
public
static
final
int
RefreshBackgroundAvatarReq
=
1744
;
public
static
final
int
RefreshBackgroundAvatarRsp
=
1719
;
public
static
final
int
RegionSearchChangeRegionNotify
=
5625
;
public
static
final
int
RegionSearchNotify
=
5635
;
public
static
final
int
ReliquaryPromoteReq
=
665
;
public
static
final
int
ReliquaryPromoteRsp
=
603
;
public
static
final
int
ReliquaryUpgradeReq
=
689
;
public
static
final
int
ReliquaryUpgradeRsp
=
609
;
public
static
final
int
RemoveBlacklistReq
=
4080
;
public
static
final
int
RemoveBlacklistRsp
=
4064
;
public
static
final
int
RemoveRandTaskInfoNotify
=
132
;
public
static
final
int
ReportTrackingIOInfoNotify
=
4117
;
public
static
final
int
ResinCardDataUpdateNotify
=
4126
;
public
static
final
int
ResinChangeNotify
=
623
;
public
static
final
int
ReunionActivateNotify
=
5081
;
public
static
final
int
ReunionBriefInfoReq
=
5085
;
public
static
final
int
ReunionBriefInfoRsp
=
5075
;
public
static
final
int
ReunionDailyRefreshNotify
=
5072
;
public
static
final
int
ReunionPrivilegeChangeNotify
=
5100
;
public
static
final
int
ReunionSettleNotify
=
5096
;
public
static
final
int
RobotPushPlayerDataNotify
=
88
;
public
static
final
int
SalesmanDeliverItemReq
=
2103
;
public
static
final
int
SalesmanDeliverItemRsp
=
2198
;
public
static
final
int
SalesmanTakeRewardReq
=
2091
;
public
static
final
int
SalesmanTakeRewardRsp
=
2171
;
public
static
final
int
SalesmanTakeSpecialRewardReq
=
2156
;
public
static
final
int
SalesmanTakeSpecialRewardRsp
=
2102
;
public
static
final
int
SaveCoopDialogReq
=
1972
;
public
static
final
int
SaveCoopDialogRsp
=
1952
;
public
static
final
int
SaveMainCoopReq
=
1995
;
public
static
final
int
SaveMainCoopRsp
=
1998
;
public
static
final
int
SceneAreaUnlockNotify
=
209
;
public
static
final
int
SceneAreaWeatherNotify
=
213
;
public
static
final
int
SceneAudioNotify
=
3260
;
public
static
final
int
SceneAvatarStaminaStepReq
=
234
;
public
static
final
int
SceneAvatarStaminaStepRsp
=
279
;
public
static
final
int
SceneCreateEntityReq
=
267
;
public
static
final
int
SceneCreateEntityRsp
=
220
;
public
static
final
int
SceneDataNotify
=
3179
;
public
static
final
int
SceneDestroyEntityReq
=
280
;
public
static
final
int
SceneDestroyEntityRsp
=
264
;
public
static
final
int
SceneEntitiesMoveCombineNotify
=
3312
;
public
static
final
int
SceneEntitiesMovesReq
=
221
;
public
static
final
int
SceneEntitiesMovesRsp
=
207
;
public
static
final
int
SceneEntityAppearNotify
=
293
;
public
static
final
int
SceneEntityDisappearNotify
=
244
;
public
static
final
int
SceneEntityDrownReq
=
265
;
public
static
final
int
SceneEntityDrownRsp
=
203
;
public
static
final
int
SceneEntityMoveNotify
=
291
;
public
static
final
int
SceneEntityMoveReq
=
245
;
public
static
final
int
SceneEntityMoveRsp
=
275
;
public
static
final
int
SceneForceLockNotify
=
266
;
public
static
final
int
SceneForceUnlockNotify
=
201
;
public
static
final
int
SceneGalleryInfoNotify
=
5528
;
public
static
final
int
SceneInitFinishReq
=
215
;
public
static
final
int
SceneInitFinishRsp
=
237
;
public
static
final
int
SceneKickPlayerNotify
=
259
;
public
static
final
int
SceneKickPlayerReq
=
204
;
public
static
final
int
SceneKickPlayerRsp
=
206
;
public
static
final
int
ScenePlayBattleInfoListNotify
=
4378
;
public
static
final
int
ScenePlayBattleInfoNotify
=
4410
;
public
static
final
int
ScenePlayBattleInterruptNotify
=
4441
;
public
static
final
int
ScenePlayBattleResultNotify
=
4447
;
public
static
final
int
ScenePlayBattleUidOpNotify
=
4438
;
public
static
final
int
ScenePlayGuestReplyInviteReq
=
4394
;
public
static
final
int
ScenePlayGuestReplyInviteRsp
=
4395
;
public
static
final
int
ScenePlayGuestReplyNotify
=
4425
;
public
static
final
int
ScenePlayInfoListNotify
=
4429
;
public
static
final
int
ScenePlayInviteResultNotify
=
4384
;
public
static
final
int
ScenePlayOutofRegionNotify
=
4405
;
public
static
final
int
ScenePlayOwnerCheckReq
=
4383
;
public
static
final
int
ScenePlayOwnerCheckRsp
=
4360
;
public
static
final
int
ScenePlayOwnerInviteNotify
=
4443
;
public
static
final
int
ScenePlayOwnerStartInviteReq
=
4365
;
public
static
final
int
ScenePlayOwnerStartInviteRsp
=
4387
;
public
static
final
int
ScenePlayerInfoNotify
=
236
;
public
static
final
int
ScenePlayerLocationNotify
=
297
;
public
static
final
int
ScenePlayerSoundNotify
=
243
;
public
static
final
int
ScenePointUnlockNotify
=
274
;
public
static
final
int
SceneRouteChangeNotify
=
270
;
public
static
final
int
SceneTeamUpdateNotify
=
1696
;
public
static
final
int
SceneTimeNotify
=
229
;
public
static
final
int
SceneTransToPointReq
=
256
;
public
static
final
int
SceneTransToPointRsp
=
283
;
public
static
final
int
SceneWeatherForcastReq
=
3167
;
public
static
final
int
SceneWeatherForcastRsp
=
3023
;
public
static
final
int
SeaLampCoinNotify
=
2028
;
public
static
final
int
SeaLampContributeItemReq
=
2122
;
public
static
final
int
SeaLampContributeItemRsp
=
2084
;
public
static
final
int
SeaLampFlyLampNotify
=
2075
;
public
static
final
int
SeaLampFlyLampReq
=
2174
;
public
static
final
int
SeaLampFlyLampRsp
=
2080
;
public
static
final
int
SeaLampPopularityNotify
=
2062
;
public
static
final
int
SeaLampTakeContributionRewardReq
=
2052
;
public
static
final
int
SeaLampTakeContributionRewardRsp
=
2057
;
public
static
final
int
SeaLampTakePhaseRewardReq
=
2109
;
public
static
final
int
SeaLampTakePhaseRewardRsp
=
2132
;
public
static
final
int
SealBattleBeginNotify
=
225
;
public
static
final
int
SealBattleEndNotify
=
249
;
public
static
final
int
SealBattleProgressNotify
=
285
;
public
static
final
int
SeeMonsterReq
=
299
;
public
static
final
int
SeeMonsterRsp
=
300
;
public
static
final
int
SelectAsterMidDifficultyReq
=
2019
;
public
static
final
int
SelectAsterMidDifficultyRsp
=
2003
;
public
static
final
int
SelectEffigyChallengeConditionReq
=
2143
;
public
static
final
int
SelectEffigyChallengeConditionRsp
=
2072
;
public
static
final
int
SelectWorktopOptionReq
=
837
;
public
static
final
int
SelectWorktopOptionRsp
=
893
;
public
static
final
int
ServerAnnounceNotify
=
2199
;
public
static
final
int
ServerAnnounceRevokeNotify
=
2129
;
public
static
final
int
ServerBuffChangeNotify
=
332
;
public
static
final
int
ServerCondMeetQuestListUpdateNotify
=
401
;
public
static
final
int
ServerDisconnectClientNotify
=
186
;
public
static
final
int
ServerGlobalValueChangeNotify
=
1188
;
public
static
final
int
ServerLogNotify
=
79
;
public
static
final
int
ServerTimeNotify
=
34
;
public
static
final
int
ServerUpdateGlobalValueNotify
=
1197
;
public
static
final
int
SetBattlePassViewedReq
=
2637
;
public
static
final
int
SetBattlePassViewedRsp
=
2606
;
public
static
final
int
SetCoopChapterViewedReq
=
1980
;
public
static
final
int
SetCoopChapterViewedRsp
=
1988
;
public
static
final
int
SetCurExpeditionChallengeIdReq
=
2017
;
public
static
final
int
SetCurExpeditionChallengeIdRsp
=
2099
;
public
static
final
int
SetEntityClientDataNotify
=
3303
;
public
static
final
int
SetEquipLockStateReq
=
635
;
public
static
final
int
SetEquipLockStateRsp
=
657
;
public
static
final
int
SetFriendEnterHomeOptionReq
=
4613
;
public
static
final
int
SetFriendEnterHomeOptionRsp
=
4724
;
public
static
final
int
SetFriendRemarkNameReq
=
4023
;
public
static
final
int
SetFriendRemarkNameRsp
=
4013
;
public
static
final
int
SetNameCardReq
=
4089
;
public
static
final
int
SetNameCardRsp
=
4009
;
public
static
final
int
SetOpenStateReq
=
162
;
public
static
final
int
SetOpenStateRsp
=
189
;
public
static
final
int
SetPlayerBirthdayReq
=
4097
;
public
static
final
int
SetPlayerBirthdayRsp
=
4088
;
public
static
final
int
SetPlayerBornDataReq
=
155
;
public
static
final
int
SetPlayerBornDataRsp
=
146
;
public
static
final
int
SetPlayerHeadImageReq
=
4046
;
public
static
final
int
SetPlayerHeadImageRsp
=
4074
;
public
static
final
int
SetPlayerNameReq
=
183
;
public
static
final
int
SetPlayerNameRsp
=
126
;
public
static
final
int
SetPlayerPropReq
=
188
;
public
static
final
int
SetPlayerPropRsp
=
128
;
public
static
final
int
SetPlayerSignatureReq
=
4028
;
public
static
final
int
SetPlayerSignatureRsp
=
4055
;
public
static
final
int
SetSceneWeatherAreaReq
=
271
;
public
static
final
int
SetSceneWeatherAreaRsp
=
205
;
public
static
final
int
SetUpAvatarTeamReq
=
1671
;
public
static
final
int
SetUpAvatarTeamRsp
=
1634
;
public
static
final
int
SetUpLunchBoxWidgetReq
=
4286
;
public
static
final
int
SetUpLunchBoxWidgetRsp
=
4293
;
public
static
final
int
SetWidgetSlotReq
=
4266
;
public
static
final
int
SetWidgetSlotRsp
=
4279
;
public
static
final
int
ShowCommonTipsNotify
=
3277
;
public
static
final
int
ShowMessageNotify
=
15
;
public
static
final
int
ShowTemplateReminderNotify
=
3164
;
public
static
final
int
SignInInfoReq
=
2510
;
public
static
final
int
SignInInfoRsp
=
2515
;
public
static
final
int
SocialDataNotify
=
4063
;
public
static
final
int
SpringUseReq
=
1720
;
public
static
final
int
SpringUseRsp
=
1727
;
public
static
final
int
StartArenaChallengeLevelReq
=
2022
;
public
static
final
int
StartArenaChallengeLevelRsp
=
2033
;
public
static
final
int
StartCoopPointReq
=
1956
;
public
static
final
int
StartCoopPointRsp
=
1962
;
public
static
final
int
StartEffigyChallengeReq
=
2123
;
public
static
final
int
StartEffigyChallengeRsp
=
2166
;
public
static
final
int
StoreItemChangeNotify
=
610
;
public
static
final
int
StoreItemDelNotify
=
615
;
public
static
final
int
StoreWeightLimitNotify
=
633
;
public
static
final
int
SyncScenePlayTeamEntityNotify
=
3296
;
public
static
final
int
SyncTeamEntityNotify
=
338
;
public
static
final
int
TakeAchievementGoalRewardReq
=
2695
;
public
static
final
int
TakeAchievementGoalRewardRsp
=
2698
;
public
static
final
int
TakeAchievementRewardReq
=
2685
;
public
static
final
int
TakeAchievementRewardRsp
=
2675
;
public
static
final
int
TakeAsterSpecialRewardReq
=
2051
;
public
static
final
int
TakeAsterSpecialRewardRsp
=
2041
;
public
static
final
int
TakeBattlePassMissionPointReq
=
2617
;
public
static
final
int
TakeBattlePassMissionPointRsp
=
2636
;
public
static
final
int
TakeBattlePassRewardReq
=
2613
;
public
static
final
int
TakeBattlePassRewardRsp
=
2601
;
public
static
final
int
TakeCityReputationExploreRewardReq
=
2888
;
public
static
final
int
TakeCityReputationExploreRewardRsp
=
2828
;
public
static
final
int
TakeCityReputationLevelRewardReq
=
2810
;
public
static
final
int
TakeCityReputationLevelRewardRsp
=
2815
;
public
static
final
int
TakeCityReputationParentQuestReq
=
2893
;
public
static
final
int
TakeCityReputationParentQuestRsp
=
2844
;
public
static
final
int
TakeCompoundOutputReq
=
108
;
public
static
final
int
TakeCompoundOutputRsp
=
117
;
public
static
final
int
TakeCoopRewardReq
=
1996
;
public
static
final
int
TakeCoopRewardRsp
=
1981
;
public
static
final
int
TakeDeliveryDailyRewardReq
=
2055
;
public
static
final
int
TakeDeliveryDailyRewardRsp
=
2104
;
public
static
final
int
TakeEffigyFirstPassRewardReq
=
2071
;
public
static
final
int
TakeEffigyFirstPassRewardRsp
=
2034
;
public
static
final
int
TakeEffigyRewardReq
=
2113
;
public
static
final
int
TakeEffigyRewardRsp
=
2008
;
public
static
final
int
TakeFirstShareRewardReq
=
4008
;
public
static
final
int
TakeFirstShareRewardRsp
=
4017
;
public
static
final
int
TakeFurnitureMakeReq
=
4751
;
public
static
final
int
TakeFurnitureMakeRsp
=
4457
;
public
static
final
int
TakeHuntingOfferReq
=
4750
;
public
static
final
int
TakeHuntingOfferRsp
=
4782
;
public
static
final
int
TakeInvestigationRewardReq
=
1926
;
public
static
final
int
TakeInvestigationRewardRsp
=
1925
;
public
static
final
int
TakeInvestigationTargetRewardReq
=
1915
;
public
static
final
int
TakeInvestigationTargetRewardRsp
=
1929
;
public
static
final
int
TakeMaterialDeleteReturnReq
=
651
;
public
static
final
int
TakeMaterialDeleteReturnRsp
=
684
;
public
static
final
int
TakeOfferingLevelRewardReq
=
2921
;
public
static
final
int
TakeOfferingLevelRewardRsp
=
2910
;
public
static
final
int
TakePlayerLevelRewardReq
=
151
;
public
static
final
int
TakePlayerLevelRewardRsp
=
184
;
public
static
final
int
TakeRegionSearchRewardReq
=
5645
;
public
static
final
int
TakeRegionSearchRewardRsp
=
5648
;
public
static
final
int
TakeResinCardDailyRewardReq
=
4136
;
public
static
final
int
TakeResinCardDailyRewardRsp
=
4143
;
public
static
final
int
TakeReunionFirstGiftRewardReq
=
5095
;
public
static
final
int
TakeReunionFirstGiftRewardRsp
=
5098
;
public
static
final
int
TakeReunionMissionRewardReq
=
5056
;
public
static
final
int
TakeReunionMissionRewardRsp
=
5062
;
public
static
final
int
TakeReunionSignInRewardReq
=
5067
;
public
static
final
int
TakeReunionSignInRewardRsp
=
5086
;
public
static
final
int
TakeReunionWatcherRewardReq
=
5065
;
public
static
final
int
TakeReunionWatcherRewardRsp
=
5077
;
public
static
final
int
TakeoffEquipReq
=
655
;
public
static
final
int
TakeoffEquipRsp
=
646
;
public
static
final
int
TaskVarNotify
=
178
;
public
static
final
int
TeamResonanceChangeNotify
=
1046
;
public
static
final
int
TowerAllDataReq
=
2445
;
public
static
final
int
TowerAllDataRsp
=
2475
;
public
static
final
int
TowerBriefDataNotify
=
2460
;
public
static
final
int
TowerBuffSelectReq
=
2497
;
public
static
final
int
TowerBuffSelectRsp
=
2488
;
public
static
final
int
TowerCurLevelRecordChangeNotify
=
2410
;
public
static
final
int
TowerDailyRewardProgressChangeNotify
=
2415
;
public
static
final
int
TowerEnterLevelReq
=
2479
;
public
static
final
int
TowerEnterLevelRsp
=
2491
;
public
static
final
int
TowerFloorRecordChangeNotify
=
2433
;
public
static
final
int
TowerGetFloorStarRewardReq
=
2489
;
public
static
final
int
TowerGetFloorStarRewardRsp
=
2409
;
public
static
final
int
TowerLevelEndNotify
=
2464
;
public
static
final
int
TowerLevelStarCondNotify
=
2401
;
public
static
final
int
TowerMiddleLevelChangeTeamNotify
=
2466
;
public
static
final
int
TowerRecordHandbookReq
=
2473
;
public
static
final
int
TowerRecordHandbookRsp
=
2463
;
public
static
final
int
TowerSurrenderReq
=
2426
;
public
static
final
int
TowerSurrenderRsp
=
2462
;
public
static
final
int
TowerTeamSelectReq
=
2493
;
public
static
final
int
TowerTeamSelectRsp
=
2444
;
public
static
final
int
TreasureMapBonusChallengeNotify
=
2121
;
public
static
final
int
TreasureMapCurrencyNotify
=
2127
;
public
static
final
int
TreasureMapDetectorDataNotify
=
4272
;
public
static
final
int
TreasureMapGuideTaskDoneNotify
=
2200
;
public
static
final
int
TreasureMapMpChallengeNotify
=
2177
;
public
static
final
int
TreasureMapRegionActiveNotify
=
2141
;
public
static
final
int
TreasureMapRegionInfoNotify
=
2120
;
public
static
final
int
TrialAvatarFirstPassDungeonNotify
=
2093
;
public
static
final
int
TrialAvatarInDungeonIndexNotify
=
2138
;
public
static
final
int
TriggerCreateGadgetToEquipPartNotify
=
373
;
public
static
final
int
TryEnterHomeReq
=
4622
;
public
static
final
int
TryEnterHomeRsp
=
4731
;
public
static
final
int
UnfreezeGroupLimitNotify
=
3401
;
public
static
final
int
UnionCmdNotify
=
55
;
public
static
final
int
UnlockAvatarTalentReq
=
1060
;
public
static
final
int
UnlockAvatarTalentRsp
=
1033
;
public
static
final
int
UnlockCoopChapterReq
=
1965
;
public
static
final
int
UnlockCoopChapterRsp
=
1977
;
public
static
final
int
UnlockNameCardNotify
=
4001
;
public
static
final
int
UnlockPersonalLineReq
=
402
;
public
static
final
int
UnlockPersonalLineRsp
=
452
;
public
static
final
int
UnlockTransPointReq
=
3421
;
public
static
final
int
UnlockTransPointRsp
=
3073
;
public
static
final
int
UnlockedFurnitureFormulaDataNotify
=
4700
;
public
static
final
int
UnlockedFurnitureSuiteDataNotify
=
4788
;
public
static
final
int
UnmarkEntityInMinMapNotify
=
247
;
public
static
final
int
UpdateAbilityCreatedMovingPlatformNotify
=
828
;
public
static
final
int
UpdatePS4BlockListReq
=
4081
;
public
static
final
int
UpdatePS4BlockListRsp
=
4027
;
public
static
final
int
UpdatePS4FriendListNotify
=
4056
;
public
static
final
int
UpdatePlayerShowAvatarListReq
=
4036
;
public
static
final
int
UpdatePlayerShowAvatarListRsp
=
4024
;
public
static
final
int
UpdatePlayerShowNameCardListReq
=
4030
;
public
static
final
int
UpdatePlayerShowNameCardListRsp
=
4047
;
public
static
final
int
UpdateReunionWatcherNotify
=
5087
;
public
static
final
int
UseItemReq
=
645
;
public
static
final
int
UseItemRsp
=
675
;
public
static
final
int
UseMiracleRingReq
=
5235
;
public
static
final
int
UseMiracleRingRsp
=
5225
;
public
static
final
int
UseWidgetCreateGadgetReq
=
4278
;
public
static
final
int
UseWidgetCreateGadgetRsp
=
4290
;
public
static
final
int
UseWidgetRetractGadgetReq
=
4255
;
public
static
final
int
UseWidgetRetractGadgetRsp
=
4297
;
public
static
final
int
ViewCodexReq
=
4210
;
public
static
final
int
ViewCodexRsp
=
4209
;
public
static
final
int
WatcherAllDataNotify
=
2260
;
public
static
final
int
WatcherChangeNotify
=
2233
;
public
static
final
int
WatcherEventNotify
=
2210
;
public
static
final
int
WatcherEventTypeNotify
=
2215
;
public
static
final
int
WaterSpritePhaseFinishNotify
=
2097
;
public
static
final
int
WeaponAwakenReq
=
664
;
public
static
final
int
WeaponAwakenRsp
=
601
;
public
static
final
int
WeaponPromoteReq
=
626
;
public
static
final
int
WeaponPromoteRsp
=
662
;
public
static
final
int
WeaponUpgradeReq
=
656
;
public
static
final
int
WeaponUpgradeRsp
=
683
;
public
static
final
int
WearEquipReq
=
688
;
public
static
final
int
WearEquipRsp
=
628
;
public
static
final
int
WidgetCoolDownNotify
=
4277
;
public
static
final
int
WidgetGadgetAllDataNotify
=
4260
;
public
static
final
int
WidgetGadgetDataNotify
=
4268
;
public
static
final
int
WidgetGadgetDestroyNotify
=
4282
;
public
static
final
int
WidgetReportReq
=
4287
;
public
static
final
int
WidgetReportRsp
=
4256
;
public
static
final
int
WidgetSlotChangeNotify
=
4299
;
public
static
final
int
WindSeedClientNotify
=
1134
;
public
static
final
int
WorktopOptionNotify
=
815
;
public
static
final
int
WorldAllRoutineTypeNotify
=
3525
;
public
static
final
int
WorldDataNotify
=
3330
;
public
static
final
int
WorldOwnerBlossomBriefInfoNotify
=
2715
;
public
static
final
int
WorldOwnerBlossomScheduleInfoNotify
=
2737
;
public
static
final
int
WorldOwnerDailyTaskNotify
=
130
;
public
static
final
int
WorldPlayerDieNotify
=
211
;
public
static
final
int
WorldPlayerInfoNotify
=
3088
;
public
static
final
int
WorldPlayerLocationNotify
=
224
;
public
static
final
int
WorldPlayerRTTNotify
=
26
;
public
static
final
int
WorldPlayerReviveReq
=
216
;
public
static
final
int
WorldPlayerReviveRsp
=
222
;
public
static
final
int
WorldRoutineChangeNotify
=
3548
;
public
static
final
int
WorldRoutineTypeCloseNotify
=
3513
;
public
static
final
int
WorldRoutineTypeRefreshNotify
=
3545
;
}
\ No newline at end of file
src/main/java/emu/grasscutter/net/packet/PacketOpcodesUtil.java
0 → 100644
View file @
7925d1cd
package
emu.grasscutter.net.packet
;
import
java.io.BufferedWriter
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.lang.reflect.Field
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
public
class
PacketOpcodesUtil
{
private
static
Int2ObjectMap
<
String
>
opcodeMap
;
static
{
opcodeMap
=
new
Int2ObjectOpenHashMap
<
String
>();
Field
[]
fields
=
PacketOpcodes
.
class
.
getFields
();
for
(
Field
f
:
fields
)
{
try
{
opcodeMap
.
put
(
f
.
getInt
(
null
),
f
.
getName
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
public
static
String
getOpcodeName
(
int
opcode
)
{
if
(
opcode
<=
0
)
return
"UNKNOWN"
;
return
opcodeMap
.
getOrDefault
(
opcode
,
"UNKNOWN"
);
}
public
static
void
dumpOpcodes
()
{
try
{
BufferedWriter
out
=
new
BufferedWriter
(
new
FileWriter
(
"opcodes.ini"
));
for
(
Int2ObjectMap
.
Entry
<
String
>
entry
:
opcodeMap
.
int2ObjectEntrySet
())
{
out
.
write
(
String
.
format
(
"%04X=%s%s"
,
entry
.
getIntKey
(),
entry
.
getValue
(),
System
.
lineSeparator
()));
}
out
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
Prev
1
2
3
4
5
6
7
8
9
10
…
18
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment