[DiscordArchive] hey guys i wanna use
[DiscordArchive] hey guys i wanna use
?
Archived author: Trojan • Posted: 2023-09-06T01:34:27.638000+00:00
Original source
hey guys i wanna use
```c++
int8 GetExperienceRate(Player * player) const
```
outside of of the DoubleXPWeekend class.
i have no clue how to achieve that.
Can someone help me
?
Archived author: Trojan • Posted: 2023-09-06T01:35:13.359000+00:00
Original source
```c++
static bool HandleXPBonusCommand(ChatHandler* handler)
{
Player* player = handler->GetPlayer();
int8 xpRate = GetExperienceRate(player);
handler->PSendSysMessage(LANG_CMD_WEEKEND_XP, xpRate);
return true;
}
```
the goal is to realize this command.
Archived author: pigzera • Posted: 2023-09-06T01:37:01.229000+00:00
Original source
maybe there is something here
https://github.com/azerothcore/mod-weeke...eekend.cpp
[Embed: mod-weekend-xp/src/mod-double-xp-weekend.cpp at master · azerothcor...]
XpWeekend module for Azerothcore. Contribute to azerothcore/mod-weekend-xp development by creating an account on GitHub.
https://github.com/azerothcore/mod-weeke...eekend.cpp
Archived author: Trojan • Posted: 2023-09-06T01:39:17.050000+00:00
Original source
im working on this thats why i ask
Archived author: Trojan • Posted: 2023-09-06T01:40:21.099000+00:00
Original source
im new to c languages and google tells me i need to include the class in a header file to create a instance of DoubleXpWeekend wich makes no sense for me in my brain haha
Archived author: Nyeriah • Posted: 2023-09-06T01:40:41.948000+00:00
Original source
just copy the code over to your new module
Archived author: Trojan • Posted: 2023-09-06T01:40:58.327000+00:00
Original source
aah no im editing the doublexpweekend module
Archived author: Trojan • Posted: 2023-09-06T01:41:47.548000+00:00
Original source
i dont create a new one. ill add the feature to the existing one
Archived author: Trojan • Posted: 2023-09-06T01:44:05.611000+00:00
Original source
my problem is i need
```c++
GetExperienceRate
```
from the class DoubleXPWeekend
in the class
```c++
class weekendxp_commandscript : public CommandScript
```
wich seems not to work.
is there any way i can achieve that?
Archived author: Revision • Posted: 2023-09-06T01:45:14.612000+00:00
Original source
As long as the GetExperienceRate function is set to static inside the CommandScript it'll work fine.