Table of Contents

Class ItemContainerMapping

Namespace
FishMMO.Server.Implementation.World.SceneServer
Assembly
FishMMO.Server.dll

Translates between the gameplay container enum and the persistence one.

public static class ItemContainerMapping
Inheritance
ItemContainerMapping
Inherited Members

Remarks

Two enums exist for one concept because the database assembly cannot reference the Unity shared assembly. They are numerically identical by contract — ItemContainerTypeParityTests pins that — so the translation is a cast, and this type exists to make every cast go through one place that says so rather than being scattered as bare (byte) conversions nobody would think to re-check when either enum gains a member.

Methods

ToContainerType(InventoryType)

The persistence container for a gameplay container.

public static ItemContainerType ToContainerType(this InventoryType inventoryType)

Parameters

inventoryType InventoryType

Returns

ItemContainerType

ToInventoryType(ItemContainerType)

The gameplay container for a persistence container.

public static InventoryType ToInventoryType(this ItemContainerType container)

Parameters

container ItemContainerType

Returns

InventoryType