(newRaceId int)
| 1742 | } |
| 1743 | |
| 1744 | func (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 | |
| 1759 | func (c *Character) RevertFormChange() []items.Item { |
| 1760 | c.FormRaceId = 0 |
no test coverage detected