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
d32f706c
Commit
d32f706c
authored
Apr 27, 2022
by
KingRainbow44
Browse files
Merge branch 'development' into api
# Conflicts: # src/main/java/emu/grasscutter/plugin/api/ServerHook.java
parents
47d8fd3c
f0d728b4
Changes
308
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketAvatarUnlockTalentNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.avatar.
Genshin
Avatar
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.AvatarUnlockTalentNotifyOuterClass.AvatarUnlockTalentNotify
;
import
emu.grasscutter.net.proto.AvatarUnlockTalentNotifyOuterClass.AvatarUnlockTalentNotify
;
public
class
PacketAvatarUnlockTalentNotify
extends
Genshin
Packet
{
public
class
PacketAvatarUnlockTalentNotify
extends
Base
Packet
{
public
PacketAvatarUnlockTalentNotify
(
Genshin
Avatar
avatar
,
int
talentId
)
{
public
PacketAvatarUnlockTalentNotify
(
Avatar
avatar
,
int
talentId
)
{
super
(
PacketOpcodes
.
AvatarUnlockTalentNotify
);
super
(
PacketOpcodes
.
AvatarUnlockTalentNotify
);
AvatarUnlockTalentNotify
proto
=
AvatarUnlockTalentNotify
.
newBuilder
()
AvatarUnlockTalentNotify
proto
=
AvatarUnlockTalentNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketAvatarUpgradeRsp.java
View file @
d32f706c
...
@@ -2,14 +2,14 @@ package emu.grasscutter.server.packet.send;
...
@@ -2,14 +2,14 @@ package emu.grasscutter.server.packet.send;
import
java.util.Map
;
import
java.util.Map
;
import
emu.grasscutter.game.avatar.
Genshin
Avatar
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.AvatarUpgradeRspOuterClass.AvatarUpgradeRsp
;
import
emu.grasscutter.net.proto.AvatarUpgradeRspOuterClass.AvatarUpgradeRsp
;
public
class
PacketAvatarUpgradeRsp
extends
Genshin
Packet
{
public
class
PacketAvatarUpgradeRsp
extends
Base
Packet
{
public
PacketAvatarUpgradeRsp
(
Genshin
Avatar
avatar
,
int
oldLevel
,
Map
<
Integer
,
Float
>
oldFightPropMap
)
{
public
PacketAvatarUpgradeRsp
(
Avatar
avatar
,
int
oldLevel
,
Map
<
Integer
,
Float
>
oldFightPropMap
)
{
super
(
PacketOpcodes
.
AvatarUpgradeRsp
);
super
(
PacketOpcodes
.
AvatarUpgradeRsp
);
this
.
buildHeader
(
0
);
this
.
buildHeader
(
0
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketAvatarWearFlycloakRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.AvatarWearFlycloakRspOuterClass.AvatarWearFlycloakRsp
;
import
emu.grasscutter.net.proto.AvatarWearFlycloakRspOuterClass.AvatarWearFlycloakRsp
;
import
emu.grasscutter.net.proto.RetcodeOuterClass
;
public
class
PacketAvatarWearFlycloakRsp
extends
Genshin
Packet
{
public
class
PacketAvatarWearFlycloakRsp
extends
Base
Packet
{
public
PacketAvatarWearFlycloakRsp
(
long
avatarGuid
,
int
costumeId
)
{
public
PacketAvatarWearFlycloakRsp
(
long
avatarGuid
,
int
costumeId
)
{
super
(
PacketOpcodes
.
AvatarWearFlycloakRsp
);
super
(
PacketOpcodes
.
AvatarWearFlycloakRsp
);
...
@@ -20,7 +21,7 @@ public class PacketAvatarWearFlycloakRsp extends GenshinPacket {
...
@@ -20,7 +21,7 @@ public class PacketAvatarWearFlycloakRsp extends GenshinPacket {
super
(
PacketOpcodes
.
AvatarWearFlycloakRsp
);
super
(
PacketOpcodes
.
AvatarWearFlycloakRsp
);
AvatarWearFlycloakRsp
proto
=
AvatarWearFlycloakRsp
.
newBuilder
()
AvatarWearFlycloakRsp
proto
=
AvatarWearFlycloakRsp
.
newBuilder
()
.
setRetcode
(
1
)
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
)
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketBuyGoodsRsp.java
0 → 100644
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.BuyGoodsRspOuterClass
;
import
emu.grasscutter.net.proto.ShopGoodsOuterClass
;
public
class
PacketBuyGoodsRsp
extends
BasePacket
{
public
PacketBuyGoodsRsp
(
int
shopType
,
int
boughtNum
,
ShopGoodsOuterClass
.
ShopGoods
sg
)
{
super
(
PacketOpcodes
.
BuyGoodsRsp
);
BuyGoodsRspOuterClass
.
BuyGoodsRsp
buyGoodsRsp
=
BuyGoodsRspOuterClass
.
BuyGoodsRsp
.
newBuilder
()
.
setShopType
(
shopType
)
.
setBoughtNum
(
boughtNum
)
.
addGoodsList
(
ShopGoodsOuterClass
.
ShopGoods
.
newBuilder
()
.
mergeFrom
(
sg
)
.
setBoughtNum
(
boughtNum
)
).
build
();
this
.
setData
(
buyGoodsRsp
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketCalcWeaponUpgradeReturnItemsRsp.java
View file @
d32f706c
...
@@ -2,13 +2,13 @@ package emu.grasscutter.server.packet.send;
...
@@ -2,13 +2,13 @@ package emu.grasscutter.server.packet.send;
import
java.util.List
;
import
java.util.List
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.Retcode
;
import
emu.grasscutter.net.proto.CalcWeaponUpgradeReturnItemsRspOuterClass.CalcWeaponUpgradeReturnItemsRsp
;
import
emu.grasscutter.net.proto.CalcWeaponUpgradeReturnItemsRspOuterClass.CalcWeaponUpgradeReturnItemsRsp
;
import
emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam
;
import
emu.grasscutter.net.proto.ItemParamOuterClass.ItemParam
;
import
emu.grasscutter.net.proto.RetcodeOuterClass
;
public
class
PacketCalcWeaponUpgradeReturnItemsRsp
extends
Genshin
Packet
{
public
class
PacketCalcWeaponUpgradeReturnItemsRsp
extends
Base
Packet
{
public
PacketCalcWeaponUpgradeReturnItemsRsp
(
long
itemGuid
,
List
<
ItemParam
>
returnItems
)
{
public
PacketCalcWeaponUpgradeReturnItemsRsp
(
long
itemGuid
,
List
<
ItemParam
>
returnItems
)
{
super
(
PacketOpcodes
.
CalcWeaponUpgradeReturnItemsRsp
);
super
(
PacketOpcodes
.
CalcWeaponUpgradeReturnItemsRsp
);
...
@@ -25,7 +25,7 @@ public class PacketCalcWeaponUpgradeReturnItemsRsp extends GenshinPacket {
...
@@ -25,7 +25,7 @@ public class PacketCalcWeaponUpgradeReturnItemsRsp extends GenshinPacket {
super
(
PacketOpcodes
.
CalcWeaponUpgradeReturnItemsRsp
);
super
(
PacketOpcodes
.
CalcWeaponUpgradeReturnItemsRsp
);
CalcWeaponUpgradeReturnItemsRsp
proto
=
CalcWeaponUpgradeReturnItemsRsp
.
newBuilder
()
CalcWeaponUpgradeReturnItemsRsp
proto
=
CalcWeaponUpgradeReturnItemsRsp
.
newBuilder
()
.
setRetcode
(
Retcode
.
FAIL
)
.
setRetcode
(
Retcode
OuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
)
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketCardProductRewardNotify.java
0 → 100644
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.CardProductRewardNotifyOuterClass.CardProductRewardNotify
;
public
class
PacketCardProductRewardNotify
extends
BasePacket
{
public
PacketCardProductRewardNotify
(
int
remainsDay
)
{
super
(
PacketOpcodes
.
CardProductRewardNotify
);
CardProductRewardNotify
proto
=
CardProductRewardNotify
.
newBuilder
()
.
setProductId
(
"ys_chn_blessofmoon_tier5"
)
.
setHcoin
(
90
)
.
setRemainDays
(
remainsDay
)
.
build
();
// Hard code Product id keep cool 😎
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketChangeAvatarRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ChangeAvatarRspOuterClass.ChangeAvatarRsp
;
import
emu.grasscutter.net.proto.ChangeAvatarRspOuterClass.ChangeAvatarRsp
;
import
emu.grasscutter.net.proto.RetcodeOuterClass
;
public
class
PacketChangeAvatarRsp
extends
Genshin
Packet
{
public
class
PacketChangeAvatarRsp
extends
Base
Packet
{
public
PacketChangeAvatarRsp
(
long
guid
)
{
public
PacketChangeAvatarRsp
(
long
guid
)
{
super
(
PacketOpcodes
.
ChangeAvatarRsp
);
super
(
PacketOpcodes
.
ChangeAvatarRsp
);
ChangeAvatarRsp
p
=
ChangeAvatarRsp
.
newBuilder
()
ChangeAvatarRsp
p
=
ChangeAvatarRsp
.
newBuilder
()
.
setRetcode
(
0
)
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
)
.
setCur
r
Guid
(
guid
)
.
setCurGuid
(
guid
)
.
build
();
.
build
();
this
.
setData
(
p
);
this
.
setData
(
p
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketChangeGameTimeRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.game.
world.
World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ChangeGameTimeRspOuterClass.ChangeGameTimeRsp
;
import
emu.grasscutter.net.proto.ChangeGameTimeRspOuterClass.ChangeGameTimeRsp
;
public
class
PacketChangeGameTimeRsp
extends
Genshin
Packet
{
public
class
PacketChangeGameTimeRsp
extends
Base
Packet
{
public
PacketChangeGameTimeRsp
(
Genshin
Player
player
)
{
public
PacketChangeGameTimeRsp
(
Player
player
)
{
super
(
PacketOpcodes
.
ChangeGameTimeRsp
);
super
(
PacketOpcodes
.
ChangeGameTimeRsp
);
ChangeGameTimeRsp
proto
=
ChangeGameTimeRsp
.
newBuilder
()
ChangeGameTimeRsp
proto
=
ChangeGameTimeRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketChangeMpTeamAvatarRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.game.TeamInfo
;
import
emu.grasscutter.game.
player.
TeamInfo
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ChangeMpTeamAvatarRspOuterClass.ChangeMpTeamAvatarRsp
;
import
emu.grasscutter.net.proto.ChangeMpTeamAvatarRspOuterClass.ChangeMpTeamAvatarRsp
;
public
class
PacketChangeMpTeamAvatarRsp
extends
Genshin
Packet
{
public
class
PacketChangeMpTeamAvatarRsp
extends
Base
Packet
{
public
PacketChangeMpTeamAvatarRsp
(
Genshin
Player
player
,
TeamInfo
teamInfo
)
{
public
PacketChangeMpTeamAvatarRsp
(
Player
player
,
TeamInfo
teamInfo
)
{
super
(
PacketOpcodes
.
ChangeMpTeamAvatarRsp
);
super
(
PacketOpcodes
.
ChangeMpTeamAvatarRsp
);
ChangeMpTeamAvatarRsp
.
Builder
proto
=
ChangeMpTeamAvatarRsp
.
newBuilder
()
ChangeMpTeamAvatarRsp
.
Builder
proto
=
ChangeMpTeamAvatarRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketChangeTeamNameRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ChangeTeamNameRspOuterClass.ChangeTeamNameRsp
;
import
emu.grasscutter.net.proto.ChangeTeamNameRspOuterClass.ChangeTeamNameRsp
;
public
class
PacketChangeTeamNameRsp
extends
Genshin
Packet
{
public
class
PacketChangeTeamNameRsp
extends
Base
Packet
{
public
PacketChangeTeamNameRsp
(
int
teamId
,
String
teamName
)
{
public
PacketChangeTeamNameRsp
(
int
teamId
,
String
teamName
)
{
super
(
PacketOpcodes
.
ChangeTeamNameRsp
);
super
(
PacketOpcodes
.
ChangeTeamNameRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketChooseCurAvatarTeamRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ChooseCurAvatarTeamRspOuterClass.ChooseCurAvatarTeamRsp
;
import
emu.grasscutter.net.proto.ChooseCurAvatarTeamRspOuterClass.ChooseCurAvatarTeamRsp
;
public
class
PacketChooseCurAvatarTeamRsp
extends
Genshin
Packet
{
public
class
PacketChooseCurAvatarTeamRsp
extends
Base
Packet
{
public
PacketChooseCurAvatarTeamRsp
(
int
teamId
)
{
public
PacketChooseCurAvatarTeamRsp
(
int
teamId
)
{
super
(
PacketOpcodes
.
ChooseCurAvatarTeamRsp
);
super
(
PacketOpcodes
.
ChooseCurAvatarTeamRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketClientAbilityInitFinishNotify.java
View file @
d32f706c
...
@@ -2,12 +2,12 @@ package emu.grasscutter.server.packet.send;
...
@@ -2,12 +2,12 @@ package emu.grasscutter.server.packet.send;
import
java.util.List
;
import
java.util.List
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.AbilityInvokeEntryOuterClass.AbilityInvokeEntry
;
import
emu.grasscutter.net.proto.AbilityInvokeEntryOuterClass.AbilityInvokeEntry
;
import
emu.grasscutter.net.proto.ClientAbilityInitFinishNotifyOuterClass.ClientAbilityInitFinishNotify
;
import
emu.grasscutter.net.proto.ClientAbilityInitFinishNotifyOuterClass.ClientAbilityInitFinishNotify
;
public
class
PacketClientAbilityInitFinishNotify
extends
Genshin
Packet
{
public
class
PacketClientAbilityInitFinishNotify
extends
Base
Packet
{
public
PacketClientAbilityInitFinishNotify
(
List
<
AbilityInvokeEntry
>
entries
)
{
public
PacketClientAbilityInitFinishNotify
(
List
<
AbilityInvokeEntry
>
entries
)
{
super
(
PacketOpcodes
.
ClientAbilityInitFinishNotify
,
true
);
super
(
PacketOpcodes
.
ClientAbilityInitFinishNotify
,
true
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketCombatInvocationsNotify.java
View file @
d32f706c
...
@@ -2,12 +2,12 @@ package emu.grasscutter.server.packet.send;
...
@@ -2,12 +2,12 @@ package emu.grasscutter.server.packet.send;
import
java.util.List
;
import
java.util.List
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.CombatInvocationsNotifyOuterClass.CombatInvocationsNotify
;
import
emu.grasscutter.net.proto.CombatInvocationsNotifyOuterClass.CombatInvocationsNotify
;
import
emu.grasscutter.net.proto.CombatInvokeEntryOuterClass.CombatInvokeEntry
;
import
emu.grasscutter.net.proto.CombatInvokeEntryOuterClass.CombatInvokeEntry
;
public
class
PacketCombatInvocationsNotify
extends
Genshin
Packet
{
public
class
PacketCombatInvocationsNotify
extends
Base
Packet
{
public
PacketCombatInvocationsNotify
(
CombatInvokeEntry
entry
)
{
public
PacketCombatInvocationsNotify
(
CombatInvokeEntry
entry
)
{
super
(
PacketOpcodes
.
CombatInvocationsNotify
,
true
);
super
(
PacketOpcodes
.
CombatInvocationsNotify
,
true
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketCombineRsp.java
0 → 100644
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.CombineReqOuterClass
;
import
emu.grasscutter.net.proto.CombineRspOuterClass
;
import
emu.grasscutter.net.proto.ItemParamOuterClass
;
import
emu.grasscutter.net.proto.RetcodeOuterClass
;
public
class
PacketCombineRsp
extends
BasePacket
{
public
PacketCombineRsp
()
{
super
(
PacketOpcodes
.
CombineRsp
);
CombineRspOuterClass
.
CombineRsp
proto
=
CombineRspOuterClass
.
CombineRsp
.
newBuilder
()
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
).
build
();
this
.
setData
(
proto
);
}
public
PacketCombineRsp
(
int
retcode
)
{
super
(
PacketOpcodes
.
CombineRsp
);
CombineRspOuterClass
.
CombineRsp
proto
=
CombineRspOuterClass
.
CombineRsp
.
newBuilder
()
.
setRetcode
(
retcode
).
build
();
this
.
setData
(
proto
);
}
public
PacketCombineRsp
(
CombineReqOuterClass
.
CombineReq
combineReq
,
Iterable
<
ItemParamOuterClass
.
ItemParam
>
costItemList
,
Iterable
<
ItemParamOuterClass
.
ItemParam
>
resultItemList
,
Iterable
<
ItemParamOuterClass
.
ItemParam
>
totalRandomItemList
,
Iterable
<
ItemParamOuterClass
.
ItemParam
>
totalReturnItemList
,
Iterable
<
ItemParamOuterClass
.
ItemParam
>
totalExtraItemList
)
{
super
(
PacketOpcodes
.
CombineRsp
);
CombineRspOuterClass
.
CombineRsp
proto
=
CombineRspOuterClass
.
CombineRsp
.
newBuilder
()
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SUCC_VALUE
)
.
setCombineId
(
combineReq
.
getCombineId
())
.
setCombineCount
(
combineReq
.
getCombineCount
())
.
setAvatarGuid
(
combineReq
.
getAvatarGuid
())
.
addAllCostItemList
(
costItemList
)
.
addAllResultItemList
(
resultItemList
)
.
addAllTotalRandomItemList
(
totalRandomItemList
)
.
addAllTotalReturnItemList
(
totalReturnItemList
)
.
addAllTotalExtraItemList
(
totalExtraItemList
)
.
build
();
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketDealAddFriendRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.DealAddFriendResultTypeOuterClass.DealAddFriendResultType
;
import
emu.grasscutter.net.proto.DealAddFriendResultTypeOuterClass.DealAddFriendResultType
;
import
emu.grasscutter.net.proto.DealAddFriendRspOuterClass.DealAddFriendRsp
;
import
emu.grasscutter.net.proto.DealAddFriendRspOuterClass.DealAddFriendRsp
;
public
class
PacketDealAddFriendRsp
extends
Genshin
Packet
{
public
class
PacketDealAddFriendRsp
extends
Base
Packet
{
public
PacketDealAddFriendRsp
(
int
targetUid
,
DealAddFriendResultType
result
)
{
public
PacketDealAddFriendRsp
(
int
targetUid
,
DealAddFriendResultType
result
)
{
super
(
PacketOpcodes
.
DealAddFriendRsp
);
super
(
PacketOpcodes
.
DealAddFriendRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketDelMailRsp.java
0 → 100644
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.DelMailRspOuterClass.DelMailRsp
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PacketDelMailRsp
extends
BasePacket
{
public
PacketDelMailRsp
(
Player
player
,
List
<
Integer
>
toDeleteIds
)
{
super
(
PacketOpcodes
.
DelMailRsp
);
DelMailRsp
.
Builder
proto
=
DelMailRsp
.
newBuilder
();
List
<
Integer
>
deletedIds
=
new
ArrayList
<>();
for
(
int
mailId
:
toDeleteIds
)
{
if
(
player
.
deleteMail
(
mailId
))
{
deletedIds
.
add
(
mailId
);
}
}
this
.
setData
(
proto
.
build
());
player
.
getSession
().
send
(
new
PacketMailChangeNotify
(
player
,
null
,
deletedIds
));
}
}
\ No newline at end of file
src/main/java/emu/grasscutter/server/packet/send/PacketDelTeamEntityNotify.java
View file @
d32f706c
...
@@ -2,11 +2,11 @@ package emu.grasscutter.server.packet.send;
...
@@ -2,11 +2,11 @@ package emu.grasscutter.server.packet.send;
import
java.util.List
;
import
java.util.List
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.DelTeamEntityNotifyOuterClass.DelTeamEntityNotify
;
import
emu.grasscutter.net.proto.DelTeamEntityNotifyOuterClass.DelTeamEntityNotify
;
public
class
PacketDelTeamEntityNotify
extends
Genshin
Packet
{
public
class
PacketDelTeamEntityNotify
extends
Base
Packet
{
public
PacketDelTeamEntityNotify
(
int
sceneId
,
int
teamEntityId
)
{
public
PacketDelTeamEntityNotify
(
int
sceneId
,
int
teamEntityId
)
{
super
(
PacketOpcodes
.
DelTeamEntityNotify
);
super
(
PacketOpcodes
.
DelTeamEntityNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketDeleteFriendNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.DeleteFriendNotifyOuterClass.DeleteFriendNotify
;
import
emu.grasscutter.net.proto.DeleteFriendNotifyOuterClass.DeleteFriendNotify
;
public
class
PacketDeleteFriendNotify
extends
Genshin
Packet
{
public
class
PacketDeleteFriendNotify
extends
Base
Packet
{
public
PacketDeleteFriendNotify
(
int
targetUid
)
{
public
PacketDeleteFriendNotify
(
int
targetUid
)
{
super
(
PacketOpcodes
.
DeleteFriendNotify
);
super
(
PacketOpcodes
.
DeleteFriendNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketDeleteFriendRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.DeleteFriendRspOuterClass.DeleteFriendRsp
;
import
emu.grasscutter.net.proto.DeleteFriendRspOuterClass.DeleteFriendRsp
;
public
class
PacketDeleteFriendRsp
extends
Genshin
Packet
{
public
class
PacketDeleteFriendRsp
extends
Base
Packet
{
public
PacketDeleteFriendRsp
(
int
targetUid
)
{
public
PacketDeleteFriendRsp
(
int
targetUid
)
{
super
(
PacketOpcodes
.
DeleteFriendRsp
);
super
(
PacketOpcodes
.
DeleteFriendRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketDestroyMaterialRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.DestroyMaterialRspOuterClass.DestroyMaterialRsp
;
import
emu.grasscutter.net.proto.DestroyMaterialRspOuterClass.DestroyMaterialRsp
;
import
it.unimi.dsi.fastutil.ints.Int2IntMap
;
import
it.unimi.dsi.fastutil.ints.Int2IntMap
;
import
it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap
;
import
it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap
;
public
class
PacketDestroyMaterialRsp
extends
Genshin
Packet
{
public
class
PacketDestroyMaterialRsp
extends
Base
Packet
{
public
PacketDestroyMaterialRsp
(
Int2IntOpenHashMap
returnMaterialMap
)
{
public
PacketDestroyMaterialRsp
(
Int2IntOpenHashMap
returnMaterialMap
)
{
super
(
PacketOpcodes
.
DestroyMaterialRsp
);
super
(
PacketOpcodes
.
DestroyMaterialRsp
);
...
...
Prev
1
…
6
7
8
9
10
11
12
13
14
…
16
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