Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //After
- Player* player = getPlayerByID(playerId);
- if (!player) {
- return;
- }
- //Add this
- if (player->cast.isCasting && channelId == player->cast.mCastChannelId) { //Cast System Felipe Monteiro
- player->sendTextMessage(MESSAGE_INFO_DESCR, "You have closed your cast.");
- player->kickCastViewers();
- player->setCasting(false);
- IOLoginData::savePlayer(player);
- }
- //After
- void Game::playerShowQuestLine(uint32_t playerId, uint16_t questId)
- {
- Player* player = getPlayerByID(playerId);
- if (!player) {
- return;
- }
- Quest* quest = Quests::getInstance()->getQuestByID(questId);
- if (!quest) {
- return;
- }
- player->sendQuestLine(quest);
- }
- //Add this
- void Game::spectatorSay(const std::string& text, ProtocolGame * spectator) //Cast System Felipe Monteiro
- {
- Player* player = spectator->getPlayer();
- if (!player)
- return;
- int32_t channelId = player->cast.mCastChannelId;
- if (channelId == -1)
- return;
- if (!text.empty() && text.front() == '/' && player->isAccessPlayer())
- return;
- player->sendToChannel(spectator, text);
- }
- //Replace
- g_chat.talkToChannel(*player, type, text, channelId);
- //With
- g_chat.talkToChannel(*player, TALKTYPE_CHANNEL_O, text, channelId);
Advertisement
Add Comment
Please, Sign In to add comment