mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-07 00:56:51 -05:00
c6721432a6
* 412 - move missle code to game_client and add animation, still buggy * mostly working casting animation that cancels path Co-authored-by: carrelda@Davids-MacBook-Pro.local <carrelda@Davids-MacBook-Pro.local>
27 lines
762 B
Go
27 lines
762 B
Go
package d2netpacket
|
|
|
|
import "github.com/OpenDiablo2/OpenDiablo2/d2networking/d2netpacket/d2netpackettype"
|
|
|
|
// TODO: Need to handle being on different maps
|
|
|
|
type CastPacket struct {
|
|
SourceEntityID string `json:"sourceEntityId"`
|
|
SkillID int `json:"skillId"`
|
|
TargetX float64 `json:"targetX"`
|
|
TargetY float64 `json:"targetY"`
|
|
TargetEntityID string `json:"targetEntityId"`
|
|
}
|
|
|
|
func CreateCastPacket(entityID string, skillID int, targetX, targetY float64) NetPacket {
|
|
return NetPacket{
|
|
PacketType: d2netpackettype.CastSkill,
|
|
PacketData: CastPacket{
|
|
SourceEntityID: entityID,
|
|
SkillID: skillID,
|
|
TargetX: targetX,
|
|
TargetY: targetY,
|
|
TargetEntityID: "", // TODO implement targeting entities
|
|
},
|
|
}
|
|
}
|