Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] or is it...?

[DiscordArchive] or is it...?

[DiscordArchive] or is it...?

Pages (6): Previous 1 2 3 4 5 6 Next
rektbyfaith
Administrator
0
08-30-2023, 02:35 PM
#21
Archived author: mynameismeat • Posted: 2023-08-30T14:35:44.184000+00:00
Original source

or, more so kinda goes off of "conditions" of the the current char in the key and the next char in the key

0. if (curr is member of [' ', '.', '-'], convert to '_'
1. if isNotUpper(current) && isUpper(next), convert "aB" to "A_B"
2. if isNotNumeric(current) && isNumeric(next), convert "a1" to "a_1"
3. if isNumeric(current) && isNotNumeric(next), convert "1a" to "1_a"

and then the whole thing is upcased (so "toggle_XP_cost" becomes "TOGGLE_XP_COST") and then its prefixed with AC\_ in the wrapping function
rektbyfaith
08-30-2023, 02:35 PM #21

Archived author: mynameismeat • Posted: 2023-08-30T14:35:44.184000+00:00
Original source

or, more so kinda goes off of "conditions" of the the current char in the key and the next char in the key

0. if (curr is member of [' ', '.', '-'], convert to '_'
1. if isNotUpper(current) && isUpper(next), convert "aB" to "A_B"
2. if isNotNumeric(current) && isNumeric(next), convert "a1" to "a_1"
3. if isNumeric(current) && isNotNumeric(next), convert "1a" to "1_a"

and then the whole thing is upcased (so "toggle_XP_cost" becomes "TOGGLE_XP_COST") and then its prefixed with AC\_ in the wrapping function

rektbyfaith
Administrator
0
08-30-2023, 02:36 PM
#22
Archived author: AlexanderESmith • Posted: 2023-08-30T14:36:05.727000+00:00
Original source

I seeee
rektbyfaith
08-30-2023, 02:36 PM #22

Archived author: AlexanderESmith • Posted: 2023-08-30T14:36:05.727000+00:00
Original source

I seeee

rektbyfaith
Administrator
0
08-30-2023, 02:36 PM
#23
Archived author: mynameismeat • Posted: 2023-08-30T14:36:06.431000+00:00
Original source

https://github.com/azerothcore/azerothco...#L238-L282
rektbyfaith
08-30-2023, 02:36 PM #23

Archived author: mynameismeat • Posted: 2023-08-30T14:36:06.431000+00:00
Original source

https://github.com/azerothcore/azerothco...#L238-L282

rektbyfaith
Administrator
0
08-30-2023, 02:36 PM
#24
Archived author: mynameismeat • Posted: 2023-08-30T14:36:42.475000+00:00
Original source

but maybe that is it. Best way to confirm for sure is to pull open gdb and take a look.
rektbyfaith
08-30-2023, 02:36 PM #24

Archived author: mynameismeat • Posted: 2023-08-30T14:36:42.475000+00:00
Original source

but maybe that is it. Best way to confirm for sure is to pull open gdb and take a look.

rektbyfaith
Administrator
0
08-30-2023, 02:36 PM
#25
Archived author: mynameismeat • Posted: 2023-08-30T14:36:54.109000+00:00
Original source

or a million `printf`s
rektbyfaith
08-30-2023, 02:36 PM #25

Archived author: mynameismeat • Posted: 2023-08-30T14:36:54.109000+00:00
Original source

or a million `printf`s

rektbyfaith
Administrator
0
08-30-2023, 02:36 PM
#26
Archived author: AlexanderESmith • Posted: 2023-08-30T14:36:57.797000+00:00
Original source

hahah
rektbyfaith
08-30-2023, 02:36 PM #26

Archived author: AlexanderESmith • Posted: 2023-08-30T14:36:57.797000+00:00
Original source

hahah

rektbyfaith
Administrator
0
08-30-2023, 02:37 PM
#27
Archived author: AlexanderESmith • Posted: 2023-08-30T14:37:41.744000+00:00
Original source

Yeah I did mine totally different (obviously, since Bash isn't C++);

```VARNAME_CONVERTED=$(echo $VARNAME | awk '{print $1}' \
| sed 's/\([A-Z]\)/ \1/g' \
| sed 's/^ //g' \
| sed 's/ /_/g' \
| sed 's/\./_/g' \
| sed 's/__/_/g' \
| sed 's/[a-z]/\U&/g' \
| sed 's/X_P/XP/g' \
| sed 's/G_M/GM/g')
```
rektbyfaith
08-30-2023, 02:37 PM #27

Archived author: AlexanderESmith • Posted: 2023-08-30T14:37:41.744000+00:00
Original source

Yeah I did mine totally different (obviously, since Bash isn't C++);

```VARNAME_CONVERTED=$(echo $VARNAME | awk '{print $1}' \
| sed 's/\([A-Z]\)/ \1/g' \
| sed 's/^ //g' \
| sed 's/ /_/g' \
| sed 's/\./_/g' \
| sed 's/__/_/g' \
| sed 's/[a-z]/\U&/g' \
| sed 's/X_P/XP/g' \
| sed 's/G_M/GM/g')
```

rektbyfaith
Administrator
0
08-30-2023, 02:38 PM
#28
Archived author: AlexanderESmith • Posted: 2023-08-30T14:38:05.225000+00:00
Original source


message.txt
rektbyfaith
08-30-2023, 02:38 PM #28

Archived author: AlexanderESmith • Posted: 2023-08-30T14:38:05.225000+00:00
Original source


message.txt

rektbyfaith
Administrator
0
08-30-2023, 02:38 PM
#29
Archived author: mynameismeat • Posted: 2023-08-30T14:38:25.755000+00:00
Original source

you can do `sed -e 's/blah/blah/' -e 's/blah/blah'` to do all those rules in one command
rektbyfaith
08-30-2023, 02:38 PM #29

Archived author: mynameismeat • Posted: 2023-08-30T14:38:25.755000+00:00
Original source

you can do `sed -e 's/blah/blah/' -e 's/blah/blah'` to do all those rules in one command

rektbyfaith
Administrator
0
08-30-2023, 02:38 PM
#30
Archived author: mynameismeat • Posted: 2023-08-30T14:38:37.054000+00:00
Original source

irrelevant nitpick but its the first thing I think of lol
rektbyfaith
08-30-2023, 02:38 PM #30

Archived author: mynameismeat • Posted: 2023-08-30T14:38:37.054000+00:00
Original source

irrelevant nitpick but its the first thing I think of lol

Pages (6): Previous 1 2 3 4 5 6 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)