All pastes #71539 Raw Edit

va

public text v1 · immutable
#71539 ·published 2006-06-25 21:33 UTC
rendered paste body
	foreach (string val in Enum.GetNames(typeof(War_GameObjectType)))
	{
                int integ = (int)Enum.Parse(typeof(War_GameObjectType), val);
                Console.WriteLine("{0} = {1},", val, integ.ToString("X"));
            }

======================== old int values to hex.. ^^


======================== new enum.

   public enum War_GameObjectType
    {
        GGameObject_C_Type_Door = 0x0,
        GGameObject_C_Type_Button = 0x1,
        GGameObject_C_Type_Chest = 0x2,
        GGameObject_C_Type_Trap = 0x3,
        GGameObject_C_Type_AreaDamage = 0x4,
        GGameObject_C_Type_QuestGiver = 0x5,
        GGameObject_C_Type_Binder = 0x6,
        GGameObject_C_Type_Generic = 0x7,
        GameObject_C_Type_Chair = 0x8,
        GGameObject_C_Type_SpellFocus = 0x9,
        GGameObject_C_Type_Text = 0xA,
        GGameObject_C_Type_Goober = 0xB,
        GGameObject_C_Type_Transport = 0xC,
        GGameObject_C_Type_Camera = 0xD,
        GGameObject_C_Type_WorldObj = 0xE,
        GGameObject_C_Type_MapObjTransport = 0xF,
        GGameObject_C_Type_DuelArbiter = 0x10,
        GGameObject_C_Type_FishingHole = 0x11,
        GGameObject_C_Type_FishingNode = 0x12,
        GGameObject_C_Type_Ritual = 0x13,
        GGameObject_C_Type_Mailbox = 0x14,
        GGameObject_C_Type_AuctionHouse = 0x15,
        GGameObject_C_Type_SpellCaster = 0x16,
        GGameObject_C_Type_MeetingStone = 0x17,
        GGameObject_C_Type_FlagStand = 0x18,
        GGameObject_C_Type_FlagDrop = 0x19,
        GGameObject_C_Type_MiniGame = 0x1A
    }


Result:

Name Valley of Spirits  Type: GGameObject_C_Type_QuestGiver(5)
Name Campfire  Type: GGameObject_C_Type_Binder(6)
Name Campfire  Type: GGameObject_C_Type_Binder(6)
Name Bonfire  Type: GameObject_C_Type_Chair(8)
Name Hanging, Tall/Thin, Medium  Type: GGameObject_C_Type_QuestGiver(5)
Name Valley of Spirits  Type: GGameObject_C_Type_QuestGiver(5)
Name Cleft of Shadow  Type: GGameObject_C_Type_QuestGiver(5)
Name The Drag  Type: GGameObject_C_Type_QuestGiver(5)
Name Valley of Honor  Type: GGameObject_C_Type_QuestGiver(5)
Name Valley of Wisdom  Type: GGameObject_C_Type_QuestGiver(5)
Name Campfire  Type: GGameObject_C_Type_Binder(6)
Name Fire Festival Fury Trap  Type: GGameObject_C_Type_Binder(6)
Name Mighty Blaze  Type: GameObject_C_Type_Chair(8)
Name Fire Festival Fury Trap  Type: GGameObject_C_Type_Binder(6)