[DiscordArchive] Do you see what that code is doing ?
[DiscordArchive] Do you see what that code is doing ?
Archived author: jackpoz • Posted: 2023-04-30T19:02:43.550000+00:00
Original source
Do you see what that code is doing ?
Archived author: LaHonder • Posted: 2023-04-30T19:03:01.344000+00:00
Original source
yes, it checks if character has the first login
Archived author: LaHonder • Posted: 2023-04-30T19:03:11.435000+00:00
Original source
and if, i set it into guild
Archived author: jackpoz • Posted: 2023-04-30T19:03:16.968000+00:00
Original source
This code
Archived author: LaHonder • Posted: 2023-04-30T19:03:23.590000+00:00
Original source
then i remove the flag due to other script does it also
Archived author: jackpoz • Posted: 2023-04-30T19:03:23.711000+00:00
Original source
Just this part
Archived author: LaHonder • Posted: 2023-04-30T19:03:35.084000+00:00
Original source
already changed
Archived author: LaHonder • Posted: 2023-04-30T19:03:40.712000+00:00
Original source
```cpp
#include "ScriptMgr.h"
#include "Player.h"
#include "WorldSession.h"
class GuildJoinScript : public PlayerScript
{
public:
GuildJoinScript() : PlayerScript("GuildJoinScript") { }
void OnLogin(Player* player, bool /**/) override
{
if (player->HasAtLoginFlag(AT_LOGIN_FIRST))
player->SetInGuild(1),
player->SetRank(0);
player->RemoveAtLoginFlag(AT_LOGIN_FIRST);
}
};
void AddSC_guild_join()
{
new GuildJoinScript();
}
```
Archived author: jackpoz • Posted: 2023-04-30T19:04:01.132000+00:00
Original source
Btw you shouldn't remove any flag
Archived author: jackpoz • Posted: 2023-04-30T19:04:20.337000+00:00
Original source
You should check first of all how OnLogin is defined