MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / ApplyFormChange

Method ApplyFormChange

internal/characters/character.go:1744–1757  ·  view source on GitHub ↗
(newRaceId int)

Source from the content-addressed store, hash-verified

1742}
1743
1744func (c *Character) ApplyFormChange(newRaceId int) []items.Item {
1745 if races.GetRace(newRaceId) == nil {
1746 return nil
1747 }
1748
1749 if c.IsFormChanged() {
1750 c.RevertFormChange()
1751 }
1752
1753 c.FormRaceId = newRaceId
1754 c.Validate(true)
1755
1756 return nil
1757}
1758
1759func (c *Character) RevertFormChange() []items.Item {
1760 c.FormRaceId = 0

Callers 3

FormSetFunction · 0.45
ChangeFormFunction · 0.45
onMagicFunction · 0.45

Calls 4

IsFormChangedMethod · 0.95
RevertFormChangeMethod · 0.95
ValidateMethod · 0.95
GetRaceFunction · 0.92

Tested by

no test coverage detected