Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] hey Locus, looking at your fixes, if statements, if they don't have them, need the code encapsulated

[DiscordArchive] hey Locus, looking at your fixes, if statements, if they don't have them, need the code encapsulated

[DiscordArchive] hey Locus, looking at your fixes, if statements, if they don't have them, need the code encapsulated

rektbyfaith
Administrator
0
08-14-2020, 07:03 PM
#1
Archived author: Deleted User • Posted: 2020-08-14T19:03:31.196000+00:00
Original source

hey Locus, looking at your fixes, if statements, if they don't have them, need the code encapsulated in curly brackets?
rektbyfaith
08-14-2020, 07:03 PM #1

Archived author: Deleted User • Posted: 2020-08-14T19:03:31.196000+00:00
Original source

hey Locus, looking at your fixes, if statements, if they don't have them, need the code encapsulated in curly brackets?

rektbyfaith
Administrator
0
08-14-2020, 07:06 PM
#2
Archived author: Deleted User • Posted: 2020-08-14T19:06:27.276000+00:00
Original source

like I'm looking in mod-individual-xp and see this iff block:
``` Player* me = handler->GetSession()->GetPlayer();
if (!me)
return false;

me->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN);
me->GetSession()->SendAreaTriggerMessage("You have enabled your XP gain.");
return true;
}

```
rektbyfaith
08-14-2020, 07:06 PM #2

Archived author: Deleted User • Posted: 2020-08-14T19:06:27.276000+00:00
Original source

like I'm looking in mod-individual-xp and see this iff block:
``` Player* me = handler->GetSession()->GetPlayer();
if (!me)
return false;

me->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN);
me->GetSession()->SendAreaTriggerMessage("You have enabled your XP gain.");
return true;
}

```

rektbyfaith
Administrator
0
08-14-2020, 07:06 PM
#3
Archived author: Deleted User • Posted: 2020-08-14T19:06:37.646000+00:00
Original source

that doesn't look correct
rektbyfaith
08-14-2020, 07:06 PM #3

Archived author: Deleted User • Posted: 2020-08-14T19:06:37.646000+00:00
Original source

that doesn't look correct

rektbyfaith
Administrator
0
08-14-2020, 07:06 PM
#4
Archived author: Deleted User • Posted: 2020-08-14T19:06:54.867000+00:00
Original source

or am I wrong?
rektbyfaith
08-14-2020, 07:06 PM #4

Archived author: Deleted User • Posted: 2020-08-14T19:06:54.867000+00:00
Original source

or am I wrong?

rektbyfaith
Administrator
0
08-14-2020, 07:13 PM
#5
Archived author: Deleted User • Posted: 2020-08-14T19:13:34.247000+00:00
Original source

as I go through code I see tons of if, else, and else if statements without brackets
rektbyfaith
08-14-2020, 07:13 PM #5

Archived author: Deleted User • Posted: 2020-08-14T19:13:34.247000+00:00
Original source

as I go through code I see tons of if, else, and else if statements without brackets

rektbyfaith
Administrator
0
08-14-2020, 07:15 PM
#6
Archived author: Deleted User • Posted: 2020-08-14T19:15:06.949000+00:00
Original source

Sorry for the ping, <@!381683315909984257> just wanted to see if I was right so I could fix some and issue some pull requests
rektbyfaith
08-14-2020, 07:15 PM #6

Archived author: Deleted User • Posted: 2020-08-14T19:15:06.949000+00:00
Original source

Sorry for the ping, <@!381683315909984257> just wanted to see if I was right so I could fix some and issue some pull requests

rektbyfaith
Administrator
0
08-14-2020, 07:17 PM
#7
Archived author: locus313 • Posted: 2020-08-14T19:17:54.502000+00:00
Original source

from the feedback i got from helias yeah it should.
rektbyfaith
08-14-2020, 07:17 PM #7

Archived author: locus313 • Posted: 2020-08-14T19:17:54.502000+00:00
Original source

from the feedback i got from helias yeah it should.

rektbyfaith
Administrator
0
08-14-2020, 07:18 PM
#8
Archived author: Deleted User • Posted: 2020-08-14T19:18:12.768000+00:00
Original source

``` for (SessionMap::iterator itr = sessions.begin(); itr != sessions.end(); ++itr)
{
if (!itr->second)
continue;

if (!itr->second->GetPlayer())
{
continue;
}
if(!itr->second->GetPlayer()->IsInWorld())
{
continue;
}
```
rektbyfaith
08-14-2020, 07:18 PM #8

Archived author: Deleted User • Posted: 2020-08-14T19:18:12.768000+00:00
Original source

``` for (SessionMap::iterator itr = sessions.begin(); itr != sessions.end(); ++itr)
{
if (!itr->second)
continue;

if (!itr->second->GetPlayer())
{
continue;
}
if(!itr->second->GetPlayer()->IsInWorld())
{
continue;
}
```

rektbyfaith
Administrator
0
08-14-2020, 07:18 PM
#9
Archived author: Deleted User • Posted: 2020-08-14T19:18:20.798000+00:00
Original source

so I see this, that first if statement isn't contained
rektbyfaith
08-14-2020, 07:18 PM #9

Archived author: Deleted User • Posted: 2020-08-14T19:18:20.798000+00:00
Original source

so I see this, that first if statement isn't contained

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)