Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profession sort key #611

Open
ab9rf opened this issue Jun 24, 2023 · 0 comments
Open

profession sort key #611

ab9rf opened this issue Jun 24, 2023 · 0 comments

Comments

@ab9rf
Copy link
Member

ab9rf commented Jun 24, 2023

this code (in 50.08-steam) is used to produce the sort key that is used to populate cri_unitst::profession_list_order1 on the unit screen. we should probably add an enum for the associated constants and map them to their associated professions using item attributes


int32_t FUN_1407938e0(profession param_1)

{
  switch(param_1) {
  case MINER:
    return 0;
  case WOODWORKER:
    return 100;
  case CARPENTER:
    return 0x66;
  case BOWYER:
    return 0x65;
  case WOODCUTTER:
    return 0x67;
  case STONEWORKER:
    return 200;
  case STONECUTTER:
    return 0xca;
  case STONE_CARVER:
    return 0xcb;
  case ENGRAVER:
    return 0xc9;
  case MASON:
    return 0xcc;
  case RANGER:
    return 300;
  case ANIMAL_CARETAKER:
    return 0x12d;
  case ANIMAL_TRAINER:
    return 0x12f;
  case HUNTER:
    return 0x130;
  case TRAPPER:
    return 0x131;
  case ANIMAL_DISSECTOR:
    return 0x12e;
  case METALSMITH:
    return 400;
  case FURNACE_OPERATOR:
    return 0x193;
  case WEAPONSMITH:
    return 0x195;
  case ARMORER:
    return 0x191;
  case BLACKSMITH:
    return 0x192;
  case METALCRAFTER:
    return 0x194;
  case JEWELER:
    return 500;
  case GEM_CUTTER:
    return 0x1f5;
  case GEM_SETTER:
    return 0x1f6;
  case CRAFTSMAN:
    return 600;
  case WOODCRAFTER:
    return 0x263;
  case STONECRAFTER:
    return 0x25f;
  case LEATHERWORKER:
    return 0x25d;
  case BONE_CARVER:
    return 0x259;
  case WEAVER:
    return 0x262;
  case CLOTHIER:
    return 0x25a;
  case GLASSMAKER:
    return 0x25b;
  case POTTER:
    return 0x25e;
  case GLAZER:
    return 0x25c;
  case WAX_WORKER:
    return 0x261;
  case STRAND_EXTRACTOR:
    return 0x260;
  case FISHERY_WORKER:
    return 700;
  case FISHERMAN:
    return 0x2bf;
  case FISH_DISSECTOR:
    return 0x2be;
  case FISH_CLEANER:
    return 0x2bd;
  case FARMER:
    return 800;
  case CHEESE_MAKER:
    return 0x325;
  case MILKER:
    return 0x32a;
  case COOK:
    return 0x326;
  case THRESHER:
    return 0x333;
  case MILLER:
    return 0x32b;
  case BUTCHER:
    return 0x323;
  case TANNER:
    return 0x332;
  case DYER:
    return 0x327;
  case PLANTER:
    return 0x32c;
  case HERBALIST:
    return 0x328;
  case BREWER:
    return 0x322;
  case SOAP_MAKER:
    return 0x330;
  case POTASH_MAKER:
    return 0x32d;
  case LYE_MAKER:
    return 0x329;
  case WOOD_BURNER:
    return 0x334;
  case SHEARER:
    return 0x32f;
  case SPINNER:
    return 0x331;
  case PRESSER:
    return 0x32e;
  case BEEKEEPER:
    return 0x321;
  case ENGINEER:
    return 900;
  case MECHANIC:
    return 0x385;
  case SIEGE_ENGINEER:
    return 0x387;
  case SIEGE_OPERATOR:
    return 0x388;
  case PUMP_OPERATOR:
    return 0x386;
  case CLERK:
    return 0x3ea;
  case ADMINISTRATOR:
    return 1000;
  case TRADER:
    return 0x3ef;
  case DOCTOR:
    return 0x3ec;
  case DIAGNOSER:
    return 0x3eb;
  case BONE_SETTER:
    return 0x3e9;
  case SUTURER:
    return 0x3ee;
  case SURGEON:
    return 0x3ed;
  case MERCHANT:
    return 0x44c;
  case HAMMERMAN:
    return 0x4b0;
  case MASTER_HAMMERMAN:
    return 0x4b1;
  case SPEARMAN:
    return 0x4b2;
  case MASTER_SPEARMAN:
    return 0x4b3;
  case CROSSBOWMAN:
    return 0x4b4;
  case MASTER_CROSSBOWMAN:
    return 0x4b5;
  case WRESTLER:
    return 0x4b6;
  case MASTER_WRESTLER:
    return 0x4b7;
  case AXEMAN:
    return 0x4b8;
  case MASTER_AXEMAN:
    return 0x4b9;
  case SWORDSMAN:
    return 0x4ba;
  case MASTER_SWORDSMAN:
    return 0x4bb;
  case MACEMAN:
    return 0x4bc;
  case MASTER_MACEMAN:
    return 0x4bd;
  case PIKEMAN:
    return 0x4be;
  case MASTER_PIKEMAN:
    return 0x4bf;
  case BOWMAN:
    return 0x4c0;
  case MASTER_BOWMAN:
    return 0x4c1;
  case BLOWGUNMAN:
    return 0x4c2;
  case MASTER_BLOWGUNMAN:
    return 0x4c3;
  case LASHER:
    return 0x4c4;
  case MASTER_LASHER:
    return 0x4c5;
  case RECRUIT:
    return 0x4c6;
  case TRAINED_HUNTER:
    return 0x4c7;
  case TRAINED_WAR:
    return 0x4c8;
  case MASTER_THIEF:
    return 0x4c9;
  case THIEF:
    return 0x4ca;
  case STANDARD:
    return 2000;
  case CHILD:
    return 0x7d1;
  case BABY:
    return 0x7d2;
  case DRUNK:
    return 0x7d3;
  case MONSTER_SLAYER:
    return 0x7d4;
  case SCOUT:
    return 0x7d5;
  case BEAST_HUNTER:
    return 0x7d6;
  case SNATCHER:
    return 0x7d7;
  case MERCENARY:
    return 0x7d8;
  case GELDER:
    return 0x324;
  case PERFORMER:
    return 0xbbc;
  case POET:
    return 0xbb9;
  case BARD:
    return 0xbba;
  case DANCER:
    return 0xbbb;
  case SAGE:
    return 0x3f0;
  case SCHOLAR:
    return 0x3f1;
  case PHILOSOPHER:
    return 0x3f2;
  case MATHEMATICIAN:
    return 0x3f3;
  case HISTORIAN:
    return 0x3f4;
  case ASTRONOMER:
    return 0x3f5;
  case NATURALIST:
    return 0x3f6;
  case CHEMIST:
    return 0x3f7;
  case GEOGRAPHER:
    return 0x3f8;
  case SCRIBE:
    return 0x3f9;
  case PAPERMAKER:
    return 0x264;
  case BOOKBINDER:
    return 0x265;
  case TAVERN_KEEPER:
    return 0x44d;
  case CRIMINAL:
    return 0x138a;
  case PEDDLER:
    return 0x1389;
  case PROPHET:
    return 0xfa1;
  case PILGRIM:
    return 0xfa3;
  case MONK:
    return 0xfa2;
  case MESSENGER:
    return 0x3fa;
  default:
    return 50000;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants