bool GossipSelect_barber(Player *player, Creature *_Creature, uint32 sender, uint32 action ) { char const* FeatureGossipMenu = "I want to change my facial hair style."; switch (player->getRace()) { case RACE_HUMAN: if ( player->getGender() == GENDER_FEMALE ) FeatureGossipMenu = "I want to change my piercings."; break; case RACE_ORC: if ( player->getGender() == GENDER_FEMALE ) FeatureGossipMenu = "I want to change my piercings."; break; case RACE_DWARF: if ( player->getGender() == GENDER_FEMALE ) FeatureGossipMenu = "I want to change my earrings."; break; case RACE_NIGHTELF: if ( player->getGender() == GENDER_FEMALE ) FeatureGossipMenu = "I want to change my markings."; break; case RACE_UNDEAD_PLAYER: FeatureGossipMenu = "I want to change my face."; break; case RACE_TAUREN: if ( player->getGender() == GENDER_FEMALE ) FeatureGossipMenu = "I want to change my hair."; break; case RACE_GNOME: if ( player->getGender() == GENDER_FEMALE ) FeatureGossipMenu = "I want to change my earrings."; break; case RACE_TROLL: FeatureGossipMenu = "I want to change my tusks."; break; case RACE_BLOODELF: if ( player->getGender() == GENDER_FEMALE ) FeatureGossipMenu = "I want to change my earrings."; break; case RACE_DRAENEI: player->getGender() == GENDER_FEMALE ? FeatureGossipMenu = "I want to change my horns." : FeatureGossipMenu = "I want to change my tentacles."; break; } // MAP // 1 - main menu // 2 - next hair style // 3 - prev hair style // 4 - next hair color // 5 - prev hair color // 6 - next facial feature // 7 - prev facial feature // 8 - not enought gold, or other close switch (action) { // After player requested the action case GOSSIP_ACTION_INFO_DEF+1: if ( sender == GOSSIP_SENDER_MAIN ) { if(player->GetMoney() >= 50000) player->ModifyMoney(-50000); else player->SendBuyError( BUY_ERR_NOT_ENOUGHT_MONEY, _Creature, 0, 0); } player->ADD_GOSSIP_ITEM( 0, "I want to change my hair style.", GOSSIP_SENDER_OPTION , GOSSIP_ACTION_INFO_DEF + 2); player->ADD_GOSSIP_ITEM( 0, "I want to change my hair color.", GOSSIP_SENDER_OPTION , GOSSIP_ACTION_INFO_DEF + 4); player->ADD_GOSSIP_ITEM( 0, FeatureGossipMenu, GOSSIP_SENDER_OPTION , GOSSIP_ACTION_INFO_DEF + 6); player->SEND_GOSSIP_MENU(50023, _Creature->GetGUID()); break; // hair style // next - increase hair style case GOSSIP_ACTION_INFO_DEF+2: if ( sender == GOSSIP_SENDER_SUBOPTION ) SelectHairStyle(player,1); // previous - decrease it case GOSSIP_ACTION_INFO_DEF+3: if ( action == GOSSIP_ACTION_INFO_DEF+3 && sender == GOSSIP_SENDER_SUBOPTION ) SelectHairStyle(player,-1); // choose options again player->ADD_GOSSIP_ITEM( 0, "Next one!", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 2); player->ADD_GOSSIP_ITEM( 0, "Previous one!", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 3); player->ADD_GOSSIP_ITEM( 0, "I'll have this one.", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(50024, _Creature->GetGUID()); break; // hair color // next - increase hair color case GOSSIP_ACTION_INFO_DEF+4: if ( sender == GOSSIP_SENDER_SUBOPTION ) SelectHairColor(player,1); // previous - decrease hair color case GOSSIP_ACTION_INFO_DEF+5: if ( action == GOSSIP_ACTION_INFO_DEF+5 && sender == GOSSIP_SENDER_SUBOPTION ) SelectHairColor(player,-1); // choose options again player->ADD_GOSSIP_ITEM( 0, "Next one!", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 4); player->ADD_GOSSIP_ITEM( 0, "Previous one!",GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 5); player->ADD_GOSSIP_ITEM( 0, "I'll have this one.", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(50024, _Creature->GetGUID()); break; // facial feature // next - increase hair style case GOSSIP_ACTION_INFO_DEF+6: if ( sender == GOSSIP_SENDER_SUBOPTION ) SelectFacialFeature(player,1); // previous - decrease it case GOSSIP_ACTION_INFO_DEF+7: if ( action == GOSSIP_ACTION_INFO_DEF+7 && sender == GOSSIP_SENDER_SUBOPTION ) SelectFacialFeature(player,-1); // choose options again player->ADD_GOSSIP_ITEM( 0, "Next one!", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 6); player->ADD_GOSSIP_ITEM( 0, "Previous one!", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 7); player->ADD_GOSSIP_ITEM( 0, "I'll have this one.", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(50024, _Creature->GetGUID()); break; // cannot affort case GOSSIP_ACTION_INFO_DEF+8: player->PlayerTalkClass->CloseGossip(); break; } return true; }
bool GossipSelect_barber(Player *player, Creature *_Creature, uint32 sender, uint32 action) { char const* FeatureGossipMenu = " I want to change my beard."; switch (player->getRace()) { case RACE_HUMAN: if (player->getGender() == GENDER_FEMALE) FeatureGossipMenu = " I want to change my priercing"; break; case RACE_ORC: if (player->getGender() == GENDER_FEMALE) FeatureGossipMenu = " I want to change my priercing"; break; case RACE_DWARF: if (player->getGender() == GENDER_FEMALE) FeatureGossipMenu = " I want to change my earrings."; break; case RACE_NIGHTELF: if (player->getGender() == GENDER_FEMALE) FeatureGossipMenu = "I want to change my face marks."; break; case RACE_UNDEAD: FeatureGossipMenu = "I want to change my face."; break; case RACE_TAUREN: if (player->getGender() == GENDER_FEMALE) FeatureGossipMenu = "I want to change my hair."; break; case RACE_GNOME: if (player->getGender() == GENDER_FEMALE) FeatureGossipMenu = " I want to change my earrings."; break; case RACE_TROLL: FeatureGossipMenu = " I want to change my tusks."; break; case RACE_BLOODELF: if (player->getGender() == GENDER_FEMALE) FeatureGossipMenu = " I want to change my earrings."; break; case RACE_DRAENEI: player->getGender() == GENDER_FEMALE ? FeatureGossipMenu = " I want to change my horns." : FeatureGossipMenu = " I want to change my face tentacles."; break; } // MAP // 1 - main menu // 2 - next hair style // 3 - prev hair style // 4 - next hair color // 5 - prev hair color // 6 - next facial feature // 7 - prev facial feature // 8 - not enought gold, or other close switch (action) { // After player requested the action case GOSSIP_ACTION_INFO_DEF + 1: if (sender == GOSSIP_SENDER_MAIN) { // if (!player->HasItemCount(23580,1,false) || !player->HasItemCount(10663,5,false)) if (player->GetMoney() < BET) { player->PlayerTalkClass->CloseGossip(); break; } player->ModifyMoney(-1 * BET); //player->DestroyItemCount(23580, 1, true, false); //player->DestroyItemCount(10663, 5, true, false); // Skrytie helmy if (!player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM)) player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM); } player->ADD_GOSSIP_ITEM(0, " I want to change my hairstyle.", GOSSIP_SENDER_OPTION, GOSSIP_ACTION_INFO_DEF + 2); player->ADD_GOSSIP_ITEM(0, " I want to change my hair color.", GOSSIP_SENDER_OPTION, GOSSIP_ACTION_INFO_DEF + 4); player->ADD_GOSSIP_ITEM(0, FeatureGossipMenu, GOSSIP_SENDER_OPTION, GOSSIP_ACTION_INFO_DEF + 6); player->PlayerTalkClass->SendGossipMenu(60023, _Creature->GetObjectGuid()); break; // hair style // next - increase hair style case GOSSIP_ACTION_INFO_DEF + 2: if (sender == GOSSIP_SENDER_SUBOPTION) SelectHairStyle(player, 1); // previous - decrease it case GOSSIP_ACTION_INFO_DEF + 3: if (action == GOSSIP_ACTION_INFO_DEF + 3 && sender == GOSSIP_SENDER_SUBOPTION) SelectHairStyle(player, -1); // choose options again player->ADD_GOSSIP_ITEM(0, "Next!", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 2); player->ADD_GOSSIP_ITEM(0, "Previous one!!", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 3); player->ADD_GOSSIP_ITEM(0, "I want this.", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 1); player->PlayerTalkClass->SendGossipMenu(60024, _Creature->GetObjectGuid()); break; // hair color // next - increase hair color case GOSSIP_ACTION_INFO_DEF + 4: if (sender == GOSSIP_SENDER_SUBOPTION) SelectHairColor(player, 1); // previous - decrease hair color case GOSSIP_ACTION_INFO_DEF + 5: if (action == GOSSIP_ACTION_INFO_DEF + 5 && sender == GOSSIP_SENDER_SUBOPTION) SelectHairColor(player, -1); // choose options again player->ADD_GOSSIP_ITEM(0, "Next!", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 4); player->ADD_GOSSIP_ITEM(0, "Previous one!", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 5); player->ADD_GOSSIP_ITEM(0, "I want this.", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 1); player->PlayerTalkClass->SendGossipMenu(60024, _Creature->GetObjectGuid()); break; // facial feature // next - increase facial style case GOSSIP_ACTION_INFO_DEF + 6: if (sender == GOSSIP_SENDER_SUBOPTION) SelectFacialFeature(player, 1); // previous - decrease it case GOSSIP_ACTION_INFO_DEF + 7: if (action == GOSSIP_ACTION_INFO_DEF + 7 && sender == GOSSIP_SENDER_SUBOPTION) SelectFacialFeature(player, -1); // choose options again player->ADD_GOSSIP_ITEM(0, "Next!", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 6); player->ADD_GOSSIP_ITEM(0, "Previous one!", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 7); player->ADD_GOSSIP_ITEM(0, "I want this.", GOSSIP_SENDER_SUBOPTION, GOSSIP_ACTION_INFO_DEF + 1); player->PlayerTalkClass->SendGossipMenu(60024, _Creature->GetObjectGuid()); break; // cannot affort case GOSSIP_ACTION_INFO_DEF + 8: player->PlayerTalkClass->CloseGossip(); break; /* // OK zaplat case GOSSIP_ACTION_INFO_DEF+8: // if (!player->HasItemCount(23580,1,false) || !player->HasItemCount(10663,5,false)) if(player->GetMoney() < BET) { player->PlayerTalkClass->CloseGossip(); break; } player->ModifyMoney(-1*BET); //player->DestroyItemCount(23580, 1, true, false); //player->DestroyItemCount(10663, 5, true, false); player->ADD_GOSSIP_ITEM(0, "Another change.", GOSSIP_SENDER_SUBOPTION , GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(60024, _Creature->GetGUID()); break; */ } return true; }