Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] hey guys i wanna use

[DiscordArchive] hey guys i wanna use

[DiscordArchive] hey guys i wanna use

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
09-06-2023, 01:34 AM
#1
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 Big Grin?
rektbyfaith
09-06-2023, 01:34 AM #1

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 Big Grin?

rektbyfaith
Administrator
0
09-06-2023, 01:35 AM
#2
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.
rektbyfaith
09-06-2023, 01:35 AM #2

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.

rektbyfaith
Administrator
0
09-06-2023, 01:37 AM
#3
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
rektbyfaith
09-06-2023, 01:37 AM #3

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

rektbyfaith
Administrator
0
09-06-2023, 01:39 AM
#4
Archived author: Trojan • Posted: 2023-09-06T01:39:17.050000+00:00
Original source

im working on this thats why i ask
rektbyfaith
09-06-2023, 01:39 AM #4

Archived author: Trojan • Posted: 2023-09-06T01:39:17.050000+00:00
Original source

im working on this thats why i ask

rektbyfaith
Administrator
0
09-06-2023, 01:40 AM
#5
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
rektbyfaith
09-06-2023, 01:40 AM #5

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

rektbyfaith
Administrator
0
09-06-2023, 01:40 AM
#6
Archived author: Nyeriah • Posted: 2023-09-06T01:40:41.948000+00:00
Original source

just copy the code over to your new module
rektbyfaith
09-06-2023, 01:40 AM #6

Archived author: Nyeriah • Posted: 2023-09-06T01:40:41.948000+00:00
Original source

just copy the code over to your new module

rektbyfaith
Administrator
0
09-06-2023, 01:40 AM
#7
Archived author: Trojan • Posted: 2023-09-06T01:40:58.327000+00:00
Original source

aah no im editing the doublexpweekend module
rektbyfaith
09-06-2023, 01:40 AM #7

Archived author: Trojan • Posted: 2023-09-06T01:40:58.327000+00:00
Original source

aah no im editing the doublexpweekend module

rektbyfaith
Administrator
0
09-06-2023, 01:41 AM
#8
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
rektbyfaith
09-06-2023, 01:41 AM #8

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

rektbyfaith
Administrator
0
09-06-2023, 01:44 AM
#9
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?
rektbyfaith
09-06-2023, 01:44 AM #9

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?

rektbyfaith
Administrator
0
09-06-2023, 01:45 AM
#10
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.
rektbyfaith
09-06-2023, 01:45 AM #10

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.

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)