1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-17 18:06:03 -05:00
OpenDiablo2/d2common/d2enum/player_animation_mode.go
presiyan-ivanov 88326b5278
Initial cast overlay implementation. Fix HeroSkill deserialization & map entities processing crashing for remote client. (#766)
* Casting a skill now plays the corresponding overlay(if any).

* Prevent a crash caused by nil pointer in HeroSkill deserialization, happening when
unmarshalling HeroSkill from packets as a remote client.

* Add PlayerAnimationModeNone to handle some of the Skills(e.g.
Paladin auras) having "" as animation mode.

* Joining a game as remote client now waits for map generation to finish
before rendering map or processing map entities. This is temporary hack to prevent the game from
crashing due to concurrent map read & write exception.

* Send CastSkill packet to other clients.

Co-authored-by: Presiyan Ivanov <presiyan-ivanov@users.noreply.github.com>
2020-10-10 18:47:51 -04:00

32 lines
1.6 KiB
Go

package d2enum
//go:generate stringer -linecomment -type PlayerAnimationMode -output player_animation_mode_string.go
// PlayerAnimationMode represents player animation modes
type PlayerAnimationMode int
// Player animation modes
const (
PlayerAnimationModeDeath PlayerAnimationMode = iota // DT
PlayerAnimationModeNeutral // NU
PlayerAnimationModeWalk // WL
PlayerAnimationModeRun // RN
PlayerAnimationModeGetHit // GH
PlayerAnimationModeTownNeutral // TN
PlayerAnimationModeTownWalk // TW
PlayerAnimationModeAttack1 // A1
PlayerAnimationModeAttack2 // A2
PlayerAnimationModeBlock // BL
PlayerAnimationModeCast // SC
PlayerAnimationModeThrow // TH
PlayerAnimationModeKick // KK
PlayerAnimationModeSkill1 // S1
PlayerAnimationModeSkill2 // S2
PlayerAnimationModeSkill3 // S3
PlayerAnimationModeSkill4 // S4
PlayerAnimationModeDead // DD
PlayerAnimationModeSequence // GH
PlayerAnimationModeKnockBack // GH
PlayerAnimationModeNone // "" - aura skills, e.g. Paladin's Concentration Aura
)