• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Helper NPC

Status
Not open for further replies.

Tommy

Founder
The script is outdated. I'm assuming you're using a recent TC source and judging from the errors complaining about Guid, it is from the 'Whisper' arguments as they are wrong.

Here are the parameters:

Code:
[URL="https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Entities/Unit/Unit.h#L2168"]Whisper(std::string const& text, Language language, Player* target, bool isBossWhisper = false);[/URL]


Whilst the current argument where the Player* target is supposed to be has the old "player->GetGUID()". The way to resolve it is to replace "player->GetGUID()" with "player". Also, there's no need for isBossWhisper parameter to be assigned a value because it is assigned to false by default, ergo you don't have to give it a value if you aren't going to use it of course. Example:


Before:
Code:
                                creature->Whisper("You're in combat!", LANG_UNIVERSAL, player->GetGUID(), false);

After:
Code:
                                creature->Whisper("You're in combat!", LANG_UNIVERSAL, player);


- Moved your thread to World of Warcraft -> Scripting support as this doesn't fit in Hardware & Coding Support section. Read the sections carefully next time.
 

savenx

Enthusiast
The script is outdated. I'm assuming you're using a recent TC source and judging from the errors complaining about Guid, it is from the 'Whisper' arguments as they are wrong.

Here are the parameters:

Code:
[URL="https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Entities/Unit/Unit.h#L2168"]Whisper(std::string const& text, Language language, Player* target, bool isBossWhisper = false);[/URL]


Whilst the current argument where the Player* target is supposed to be has the old "player->GetGUID()". The way to resolve it is to replace "player->GetGUID()" with "player". Also, there's no need for isBossWhisper parameter to be assigned a value because it is assigned to false by default, ergo you don't have to give it a value if you aren't going to use it of course. Example:


Before:
Code:
                                creature->Whisper("You're in combat!", LANG_UNIVERSAL, player->GetGUID(), false);

After:
Code:
                                creature->Whisper("You're in combat!", LANG_UNIVERSAL, player);


- Moved your thread to World of Warcraft -> Scripting support as this doesn't fit in Hardware & Coding Support section. Read the sections carefully next time.

Thanks man... about the section was a mistake! Sorry.

About the script: Fixed it! Thank you!
 
Status
Not open for further replies.
Top