{Aspire} Hearthstone Core Edit Error menu

User Tag List

Results 1 to 4 of 4
  1. #1
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    {Aspire} Hearthstone Core Edit Error

    I am using Aspire HS Rev 722 and i tried to make a custom command i got it down to only 2 errors and i cannot solve them:

    Here is the code:

    Code:
    bool ChatHandler::HandleGMWhisper(const char *args, WorldSession *m_session)
    {
        vector<string> real_args = StrSplit(string(args), " ");
        if( real_args.size() < 3)
            return false;    
    
            const char *msg = real_args[1].c_str();
    
            reinterpret_cast
    
    3121. Player *plr = real_args[1].c_str();
    
    3123. BlueSystemMessageToPlr(plr, msg);
            
            if (real_args[2].c_str() == "All")
            {
            sWorld.SendWorldText(real_args[1].c_str(), NULL);        
            }
            else
            {
            SystemMessage(m_session, "This message was not boradcasted to the server only to the specified player.\n If this was intended as a server-wide message please use .announce or .wannounce.");
            }
            return true;
    }
    Here are the errors

    Code:
    1>..\..\src\hearthstone-world\Level3.cpp(3121) : error C2061: syntax error : identifier 'plr'
    1>..\..\src\hearthstone-world\Level3.cpp(3123) : error C2065: 'plr' : undeclared identifier
    The command is .gmwhisper plr msg All

    plr is the player to send it to, msg is the message to be sent, and All is whether this is for server-wide or a single player. if all is not there then it is supposed to go for normal message.

    {Aspire} Hearthstone Core Edit Error
  2. #2
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just take apart the case for CHAT_MSG_WHISPER and modify it for your needs.
    Code:
    case CHAT_MSG_WHISPER:
    		{
    			Player *player = objmgr.GetPlayer(misc.c_str(), false);
    			if(!player)
    			{
    				data = new WorldPacket(SMSG_CHAT_PLAYER_NOT_FOUND, misc.length() + 1);
    				*data << misc;
    				SendPacket(data);
    				delete data;
    				break;
    			}
    
    			// Check that the player isn't a gm with his status on
    			if(!_player->GetSession()->GetPermissionCount() && player->bGMTagOn && player->gmTargets.count(_player) == 0)
    			{
    				// Build automated reply
    				string Reply = "This Game Master does not currently have an open ticket from you and did not receive your whisper. Please submit a new GM Ticket request if you need to speak to a GM. This is an automatic message.";
    				data = sChatHandler.FillMessageData( CHAT_MSG_WHISPER, LANG_UNIVERSAL, Reply.c_str(), player->GetGUID(), 3);
    				SendPacket(data);
    				delete data;
    				break;
    			}
    
    			if(lang > 0 && LanguageSkills[lang] && _player->_HasSkillLine(LanguageSkills[lang]) == false)
    				return;
    
    			if(lang==0 && !CanUseCommand('c'))
    				return;
    
    			if( player->Social_IsIgnoring( _player->GetLowGUID() ) )
    			{
    				data = sChatHandler.FillMessageData( CHAT_MSG_IGNORED, LANG_UNIVERSAL,  msg.c_str(), _player->GetGUID(), _player->bGMTagOn ? 4 : 0 );
    				SendPacket(data);
    				delete data;
    			}
    			else
    			{
    				if(GetPlayer()->m_modlanguage >=0)
    					data = sChatHandler.FillMessageData( CHAT_MSG_WHISPER, GetPlayer()->m_modlanguage,  msg.c_str(), _player->GetGUID(), _player->bGMTagOn ? 4 : 0 );
    				else
    					data = sChatHandler.FillMessageData( CHAT_MSG_WHISPER, ((CanUseCommand('c') || player->GetSession()->CanUseCommand('c')) && lang != -1) ? LANG_UNIVERSAL : lang,  msg.c_str(), _player->GetGUID(), _player->bGMTagOn ? 4 : 0 );
    
    				player->GetSession()->SendPacket(data);
    				delete data;
    			}
    
    			//Sent the to Users id as the channel, this should be fine as it's not used for wisper
    		  
    			data = sChatHandler.FillMessageData(CHAT_MSG_WHISPER_INFORM, LANG_UNIVERSAL,msg.c_str(), player->GetGUID(), player->bGMTagOn ? 4 : 0  );
    			SendPacket(data);
    			delete data;
    
    			if(player->HasFlag(PLAYER_FLAGS, 0x02))
    			{
    				// Has AFK flag, autorespond.
    				data = sChatHandler.FillMessageData(CHAT_MSG_AFK, LANG_UNIVERSAL,  player->m_afk_reason.c_str(),player->GetGUID(), _player->bGMTagOn ? 4 : 0);
    				SendPacket(data);
    				delete data;
    			}
    			else if(player->HasFlag(PLAYER_FLAGS, 0x04))
    			{
    				// Has AFK flag, autorespond.
    				data = sChatHandler.FillMessageData(CHAT_MSG_DND, LANG_UNIVERSAL, player->m_afk_reason.c_str(),player->GetGUID(), _player->bGMTagOn ? 4 : 0);
    				SendPacket(data);
    				delete data;
    			}
    
    		} break;

  3. #3
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Clain

    Did not know where that was

  4. #4
    natenmaste's Avatar Member
    Reputation
    3
    Join Date
    Jun 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Svn

    Whats the HS SVN? =) ive looked and looked and i cant find it =) thx

    nvm i think this is it...
    http://my-svn.assembla.com/svn/Hearthstone
    Last edited by natenmaste; 01-20-2009 at 07:37 PM.

Similar Threads

  1. Aspire core compile ERROR!
    By lilbdiablo12 in forum WoW EMU Questions & Requests
    Replies: 30
    Last Post: 04-14-2009, 05:27 PM
  2. Aspire/hearthstone core+database
    By lilbdiablo12 in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 04-13-2009, 09:32 PM
  3. [Question] Model Editing - Error when no WoWME in /WoW
    By Winternacht in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 01-18-2008, 05:12 PM
  4. Changing .announce color (no core edits)
    By Le Froid in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-07-2008, 04:44 PM
  5. [Guide] Common Model Editing Errors and Solutions
    By Dragon[Sky] in forum WoW ME Tools & Guides
    Replies: 6
    Last Post: 10-25-2007, 02:33 PM
All times are GMT -5. The time now is 06:52 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search