| 1 | /* |
| 2 | * Copyright (C) 2000 Ross Combs ([email protected]) |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version 2 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ |
| 18 | #define CHARACTER_INTERNAL_ACCESScxx . . $ `src/bnetd/character.cpp:18:9`! |
| 19 | #include "common/setup_before.h"cxx . . $ `<file>/src/common/setup_before.h`/ |
| 20 | #include "character.h"cxx . . $ `<file>/src/bnetd/character.h`/ |
| 21 | |
| 22 | #include <cstdint> |
| 23 | #include <cstring> |
| 24 | |
| 25 | #include "compat/strcasecmp.h"cxx . . $ `<file>/src/compat/strcasecmp.h`/ |
| 26 | #include "common/eventlog.h"cxx . . $ `<file>/src/common/eventlog.h`/ |
| 27 | #include "common/list.h"cxx . . $ `<file>/src/common/list.h`/ |
| 28 | #include "common/bnet_protocol.h"cxx . . $ `<file>/src/common/bnet_protocol.h`/ |
| 29 | #include "account.h"cxx . . $ `<file>/src/bnetd/account.h`/ |
| 30 | #include "account_wrap.h"cxx . . $ `<file>/src/bnetd/account_wrap.h`/ |
| 31 | #include "common/bn_type.h"cxx . . $ `<file>/src/common/bn_type.h`/ |
| 32 | #include "common/util.h"cxx . . $ `<file>/src/common/util.h`/ |
| 33 | #include "common/xalloc.h"cxx . . $ `<file>/src/common/xalloc.h`/ |
| 34 | #include "common/setup_after.h"cxx . . $ `<file>/src/common/setup_after.h`/ |
| 35 | |
| 36 | |
| 37 | namespace pvpgncxx . . $ pvpgn/ |
| 38 | { |
| 39 | |
| 40 | namespace bnetdcxx . . $ pvpgn/bnetd/ |
| 41 | { |
| 42 | |
| 43 | static t_list * characterlist_headcxx . . $ pvpgn/bnetd/characterlist_head. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 44 | |
| 45 | |
| 46 | static t_character_classcxx . . $ pvpgn/bnetd/t_character_class# bncharacter_class_to_character_classcxx . . $ pvpgn/bnetd/bncharacter_class_to_character_class(605f1dea4b550d22).(stdcxx . . $ std/::uint8_tcxx . . $ std/uint8_t# cclass) |
| 47 | { |
| 48 | switch (cclass) |
| 49 | { |
| 50 | case D2CHAR_INFO_CLASS_AMAZONcxx . . $ `src/common/bnet_protocol.h:1507:9`!: |
| 51 | return character_class_amazoncxx . . $ pvpgn/bnetd/character_class_amazon.; |
| 52 | case D2CHAR_INFO_CLASS_SORCERESScxx . . $ `src/common/bnet_protocol.h:1508:9`!: |
| 53 | return character_class_sorceresscxx . . $ pvpgn/bnetd/character_class_sorceress.; |
| 54 | case D2CHAR_INFO_CLASS_NECROMANCERcxx . . $ `src/common/bnet_protocol.h:1509:9`!: |
| 55 | return character_class_necromancercxx . . $ pvpgn/bnetd/character_class_necromancer.; |
| 56 | case D2CHAR_INFO_CLASS_PALADINcxx . . $ `src/common/bnet_protocol.h:1510:9`!: |
| 57 | return character_class_paladincxx . . $ pvpgn/bnetd/character_class_paladin.; |
| 58 | case D2CHAR_INFO_CLASS_BARBARIANcxx . . $ `src/common/bnet_protocol.h:1511:9`!: |
| 59 | return character_class_barbariancxx . . $ pvpgn/bnetd/character_class_barbarian.; |
| 60 | case D2CHAR_INFO_CLASS_DRUIDcxx . . $ `src/common/bnet_protocol.h:1512:9`!: |
| 61 | return character_class_druidcxx . . $ pvpgn/bnetd/character_class_druid.; |
| 62 | case D2CHAR_INFO_CLASS_ASSASSINcxx . . $ `src/common/bnet_protocol.h:1513:9`!: |
| 63 | return character_class_assassincxx . . $ pvpgn/bnetd/character_class_assassin.; |
| 64 | default: |
| 65 | return character_class_nonecxx . . $ pvpgn/bnetd/character_class_none.; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | |
| 70 | /* Function unused |
| 71 | static t_uint8 character_class_to_bncharacter_class(t_character_class class) |
| 72 | { |
| 73 | switch (class) |
| 74 | { |
| 75 | case character_class_amazon: |
| 76 | return D2CHAR_INFO_CLASS_AMAZON; |
| 77 | case character_class_sorceress: |
| 78 | return D2CHAR_INFO_CLASS_SORCERESS; |
| 79 | case character_class_necromancer: |
| 80 | return D2CHAR_INFO_CLASS_NECROMANCER; |
| 81 | case character_class_paladin: |
| 82 | return D2CHAR_INFO_CLASS_PALADIN; |
| 83 | case character_class_barbarian: |
| 84 | return D2CHAR_INFO_CLASS_BARBARIAN; |
| 85 | case character_class_druid: |
| 86 | return D2CHAR_INFO_CLASS_DRUID; |
| 87 | case character_class_assassin: |
| 88 | return D2CHAR_INFO_CLASS_ASSASSIN; |
| 89 | default: |
| 90 | eventlog(eventlog_level_error,__FUNCTION__,"got unknown class %d",(int)class); |
| 91 | case character_class_none: |
| 92 | return D2CHAR_INFO_FILLER; |
| 93 | } |
| 94 | } |
| 95 | */ |
| 96 | |
| 97 | static const char * character_class_to_classnamecxx . . $ pvpgn/bnetd/character_class_to_classname(2d40761cef283e29).(t_character_classcxx . . $ pvpgn/bnetd/t_character_class# chclass) |
| 98 | { |
| 99 | switch (chclass) |
| 100 | { |
| 101 | case character_class_amazoncxx . . $ pvpgn/bnetd/character_class_amazon.: |
| 102 | return "Amazon"; |
| 103 | case character_class_sorceresscxx . . $ pvpgn/bnetd/character_class_sorceress.: |
| 104 | return "Sorceress"; |
| 105 | case character_class_necromancercxx . . $ pvpgn/bnetd/character_class_necromancer.: |
| 106 | return "Necromancer"; |
| 107 | case character_class_paladincxx . . $ pvpgn/bnetd/character_class_paladin.: |
| 108 | return "Paladin"; |
| 109 | case character_class_barbariancxx . . $ pvpgn/bnetd/character_class_barbarian.: |
| 110 | return "Barbarian"; |
| 111 | case character_class_druidcxx . . $ pvpgn/bnetd/character_class_druid.: |
| 112 | return "Druid"; |
| 113 | case character_class_assassincxx . . $ pvpgn/bnetd/character_class_assassin.: |
| 114 | return "Assassin"; |
| 115 | default: |
| 116 | return "Unknown"; |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | |
| 121 | static const char * character_expansion_to_expansionnamecxx . . $ pvpgn/bnetd/character_expansion_to_expansionname(252ab37092e82988).(t_character_expansioncxx . . $ pvpgn/bnetd/t_character_expansion# expansion) |
| 122 | { |
| 123 | switch (expansion) |
| 124 | { |
| 125 | case character_expansion_classiccxx . . $ pvpgn/bnetd/character_expansion_classic.: |
| 126 | return "Classic"; |
| 127 | case character_expansion_lodcxx . . $ pvpgn/bnetd/character_expansion_lod.: |
| 128 | return "LordOfDestruction"; |
| 129 | default: |
| 130 | return "Unknown"; |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | |
| 135 | static void decode_character_datacxx . . $ pvpgn/bnetd/decode_character_data(6001ba05cca6bbe3).(t_charactercxx . . $ pvpgn/bnetd/t_character# * ch) |
| 136 | { |
| 137 | ch->unknownb1cxx . . $ pvpgn/bnetd/character#unknownb1. = D2CHAR_INFO_UNKNOWNB1cxx . . $ `src/common/bnet_protocol.h:1504:9`!; |
| 138 | ch->unknownb2cxx . . $ pvpgn/bnetd/character#unknownb2. = D2CHAR_INFO_UNKNOWNB2cxx . . $ `src/common/bnet_protocol.h:1505:9`!; |
| 139 | ch->helmgfxcxx . . $ pvpgn/bnetd/character#helmgfx. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 140 | ch->bodygfxcxx . . $ pvpgn/bnetd/character#bodygfx. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 141 | ch->leggfxcxx . . $ pvpgn/bnetd/character#leggfx. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 142 | ch->lhandweaponcxx . . $ pvpgn/bnetd/character#lhandweapon. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 143 | ch->lhandgfxcxx . . $ pvpgn/bnetd/character#lhandgfx. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 144 | ch->rhandweaponcxx . . $ pvpgn/bnetd/character#rhandweapon. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 145 | ch->rhandgfxcxx . . $ pvpgn/bnetd/character#rhandgfx. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 146 | ch->unknownb3cxx . . $ pvpgn/bnetd/character#unknownb3. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 147 | ch->unknownb4cxx . . $ pvpgn/bnetd/character#unknownb4. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 148 | ch->unknownb5cxx . . $ pvpgn/bnetd/character#unknownb5. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 149 | ch->unknownb6cxx . . $ pvpgn/bnetd/character#unknownb6. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 150 | ch->unknownb7cxx . . $ pvpgn/bnetd/character#unknownb7. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 151 | ch->unknownb8cxx . . $ pvpgn/bnetd/character#unknownb8. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 152 | ch->unknownb9cxx . . $ pvpgn/bnetd/character#unknownb9. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 153 | ch->unknownb10cxx . . $ pvpgn/bnetd/character#unknownb10. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 154 | ch->unknownb11cxx . . $ pvpgn/bnetd/character#unknownb11. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 155 | ch->unknown1cxx . . $ pvpgn/bnetd/character#unknown1. = 0xffffffff; |
| 156 | ch->unknown2cxx . . $ pvpgn/bnetd/character#unknown2. = 0xffffffff; |
| 157 | ch->unknown3cxx . . $ pvpgn/bnetd/character#unknown3. = 0xffffffff; |
| 158 | ch->unknown4cxx . . $ pvpgn/bnetd/character#unknown4. = 0xffffffff; |
| 159 | ch->levelcxx . . $ pvpgn/bnetd/character#level. = 0x01; |
| 160 | ch->statuscxx . . $ pvpgn/bnetd/character#status. = 0x80; |
| 161 | ch->titlecxx . . $ pvpgn/bnetd/character#title. = 0x80; |
| 162 | ch->unknownb13cxx . . $ pvpgn/bnetd/character#unknownb13. = 0x80; |
| 163 | ch->emblembgccxx . . $ pvpgn/bnetd/character#emblembgc. = 0x80; |
| 164 | ch->emblemfgccxx . . $ pvpgn/bnetd/character#emblemfgc. = 0xff; |
| 165 | ch->emblemnumcxx . . $ pvpgn/bnetd/character#emblemnum. = 0xff; |
| 166 | ch->unknownb14cxx . . $ pvpgn/bnetd/character#unknownb14. = D2CHAR_INFO_FILLERcxx . . $ `src/common/bnet_protocol.h:1506:9`!; |
| 167 | |
| 168 | /* |
| 169 | b1 b2 hg bg lg lw lg rw rg b3 b4 b5 b6 b7 b8 b9 bA bB cl u1 u1 u1 u1 u2 u2 u2 u2 u3 u3 u3 u3 u4 u4 u4 u4 lv st ti bC eb ef en bD \0 |
| 170 | amazon_qwer.std::log: |
| 171 | 83 80 ff ff ff ff ff 43 ff 1b ff ff ff ff ff ff ff ff 01 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 80 80 80 80 ff ff ff 00 |
| 172 | sor_Bent.std::log: |
| 173 | 83 80 ff ff ff ff ff 53 ff ff ff ff ff ff ff ff ff ff 02 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 80 80 80 80 ff ff ff 00 |
| 174 | necro_Thorsen.std::log: |
| 175 | 83 80 ff ff ff ff ff 2b ff ff ff ff ff ff ff ff ff ff 03 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 80 80 80 80 ff ff ff 00 |
| 176 | pal_QlexTEST.std::log: |
| 177 | 87 80 01 01 01 01 01 ff ff ff 01 01 ff ff ff ff ff ff 04 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 80 80 ff ff ff 80 80 00 |
| 178 | barb_Qlex.std::log: |
| 179 | 83 80 ff ff ff ff ff 2f ff 1b ff ff ff ff ff ff ff ff 05 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 01 80 80 80 80 ff ff ff 00 |
| 180 | */ |
| 181 | } |
| 182 | |
| 183 | |
| 184 | static int load_initial_datacxx . . $ pvpgn/bnetd/load_initial_data(b5dd0c5075e1156f).(t_charactercxx . . $ pvpgn/bnetd/t_character# * character, t_character_classcxx . . $ pvpgn/bnetd/t_character_class# chclass, t_character_expansioncxx . . $ pvpgn/bnetd/t_character_expansion# expansion) |
| 185 | { |
| 186 | char const * data_in_hex; |
| 187 | |
| 188 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_debugcxx . . $ pvpgn/eventlog_level_debug., __FUNCTION__, "Initial Data for {}, {} {}", |
| 189 | character->namecxx . . $ pvpgn/bnetd/character#name., |
| 190 | character_expansion_to_expansionnamecxx . . $ pvpgn/bnetd/character_expansion_to_expansionname(252ab37092e82988).(expansion), |
| 191 | character_class_to_classnamecxx . . $ pvpgn/bnetd/character_class_to_classname(2d40761cef283e29).(chclass)); |
| 192 | |
| 193 | /* Ideally, this would be loaded from bnetd_default_user, but I don't want to hack account.c just now */ |
| 194 | |
| 195 | /* The "default" character info if everything else messes up; */ |
| 196 | data_in_hex = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; /* FIXME: what should we do if expansion or class isn't known... */ |
| 197 | |
| 198 | switch (expansion) |
| 199 | { |
| 200 | case character_expansion_classiccxx . . $ pvpgn/bnetd/character_expansion_classic.: |
| 201 | switch (chclass) |
| 202 | { |
| 203 | case character_class_amazoncxx . . $ pvpgn/bnetd/character_class_amazon.: |
| 204 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 01 FF FF FF FF FF FF FF FF FF FF FF 01 81 80 80 80 FF FF FF"; |
| 205 | break; |
| 206 | case character_class_sorceresscxx . . $ pvpgn/bnetd/character_class_sorceress.: |
| 207 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 02 FF FF FF FF FF FF FF FF FF FF FF 01 81 80 80 80 FF FF FF"; |
| 208 | break; |
| 209 | case character_class_necromancercxx . . $ pvpgn/bnetd/character_class_necromancer.: |
| 210 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 03 FF FF FF FF FF FF FF FF FF FF FF 01 81 80 80 80 FF FF FF"; |
| 211 | break; |
| 212 | case character_class_paladincxx . . $ pvpgn/bnetd/character_class_paladin.: |
| 213 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 04 FF FF FF FF FF FF FF FF FF FF FF 01 81 80 80 80 FF FF FF"; |
| 214 | break; |
| 215 | case character_class_barbariancxx . . $ pvpgn/bnetd/character_class_barbarian.: |
| 216 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 05 FF FF FF FF FF FF FF FF FF FF FF 01 81 80 80 80 FF FF FF"; |
| 217 | break; |
| 218 | default: break; //should never reach that part ot the code... but to make compiler happy... |
| 219 | } |
| 220 | break; |
| 221 | case character_expansion_lodcxx . . $ pvpgn/bnetd/character_expansion_lod.: |
| 222 | switch (chclass) |
| 223 | { |
| 224 | case character_class_amazoncxx . . $ pvpgn/bnetd/character_class_amazon.: |
| 225 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 01 FF FF FF FF FF FF FF FF FF FF FF 01 A1 80 80 80 FF FF FF"; |
| 226 | break; |
| 227 | case character_class_sorceresscxx . . $ pvpgn/bnetd/character_class_sorceress.: |
| 228 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 02 FF FF FF FF FF FF FF FF FF FF FF 01 A1 80 80 80 FF FF FF"; |
| 229 | break; |
| 230 | case character_class_necromancercxx . . $ pvpgn/bnetd/character_class_necromancer.: |
| 231 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 03 FF FF FF FF FF FF FF FF FF FF FF 01 A1 80 80 80 FF FF FF"; |
| 232 | break; |
| 233 | case character_class_paladincxx . . $ pvpgn/bnetd/character_class_paladin.: |
| 234 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 04 FF FF FF FF FF FF FF FF FF FF FF 01 A1 80 80 80 FF FF FF"; |
| 235 | break; |
| 236 | case character_class_barbariancxx . . $ pvpgn/bnetd/character_class_barbarian.: |
| 237 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 05 FF FF FF FF FF FF FF FF FF FF FF 01 A1 80 80 80 FF FF FF"; |
| 238 | break; |
| 239 | case character_class_druidcxx . . $ pvpgn/bnetd/character_class_druid.: |
| 240 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 06 FF FF FF FF FF FF FF FF FF FF FF 01 A1 80 80 80 FF FF FF"; |
| 241 | break; |
| 242 | case character_class_assassincxx . . $ pvpgn/bnetd/character_class_assassin.: |
| 243 | data_in_hex = "84 80 FF FF FF FF FF FF FF FF FF FF FF 07 FF FF FF FF FF FF FF FF FF FF FF 01 A1 80 80 80 FF FF FF"; |
| 244 | break; |
| 245 | default: break; // again we will never get here... but how can compiler know that?!? |
| 246 | } |
| 247 | default: break; // well... like I said 2 times before.... |
| 248 | } |
| 249 | |
| 250 | character->datalencxx . . $ pvpgn/bnetd/character#datalen. = hex_to_strcxx . . $ pvpgn/hex_to_str(89c8e27db0bdb94e).(data_in_hex, (char*)character->datacxx . . $ pvpgn/bnetd/character#data., 33); |
| 251 | |
| 252 | decode_character_datacxx . . $ pvpgn/bnetd/decode_character_data(6001ba05cca6bbe3).(character); |
| 253 | |
| 254 | return 0; |
| 255 | } |
| 256 | |
| 257 | |
| 258 | extern int character_createcxx . . $ pvpgn/bnetd/character_create(7b96d6906ccb184f).(t_accountcxx . . $ pvpgn/bnetd/t_account# * account, t_clienttagcxx . . $ pvpgn/t_clienttag# clienttag, char const * realmname, char const * name, t_character_classcxx . . $ pvpgn/bnetd/t_character_class# chclass, t_character_expansioncxx . . $ pvpgn/bnetd/t_character_expansion# expansion) |
| 259 | { |
| 260 | if (!account) |
| 261 | { |
| 262 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL account"); |
| 263 | return -1; |
| 264 | } |
| 265 | |
| 266 | if (!clienttag) |
| 267 | { |
| 268 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got bad clienttag"); |
| 269 | return -1; |
| 270 | } |
| 271 | |
| 272 | if (!realmname) |
| 273 | { |
| 274 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL realmname"); |
| 275 | return -1; |
| 276 | } |
| 277 | |
| 278 | if (!name) |
| 279 | { |
| 280 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL name"); |
| 281 | return -1; |
| 282 | } |
| 283 | |
| 284 | if (account_check_closed_charactercxx . . $ pvpgn/bnetd/account_check_closed_character(b799c29e0df1203f).(account, clienttag, realmname, name)) |
| 285 | { |
| 286 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "a character with the name \"{}\" does already exist in realm \"{}\"", name, realmname); |
| 287 | return -1; |
| 288 | } |
| 289 | |
| 290 | t_charactercxx . . $ pvpgn/bnetd/t_character#* ch = (t_charactercxx . . $ pvpgn/bnetd/t_character#*)xmalloccxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:43:9`!(sizeof(t_character)); |
| 291 | ch->namecxx . . $ pvpgn/bnetd/character#name. = xstrdupcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:49:9`!(name); |
| 292 | ch->realmnamecxx . . $ pvpgn/bnetd/character#realmname. = xstrdupcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:49:9`!(realmname); |
| 293 | ch->guildnamecxx . . $ pvpgn/bnetd/character#guildname. = xstrdupcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:49:9`!(""); /* FIXME: how does this work on Battle.net? */ |
| 294 | |
| 295 | load_initial_datacxx . . $ pvpgn/bnetd/load_initial_data(b5dd0c5075e1156f).(ch, chclass, expansion); |
| 296 | |
| 297 | account_add_closed_charactercxx . . $ pvpgn/bnetd/account_add_closed_character(2b5485768cd4416c).(account, clienttag, ch); |
| 298 | |
| 299 | xfreecxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:51:9`!((void *)ch->name); |
| 300 | xfreecxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:51:9`!((void *)ch->realmname); |
| 301 | xfreecxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:51:9`!((void *)ch->guildname); |
| 302 | xfreecxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:51:9`!(ch); |
| 303 | |
| 304 | return 0; |
| 305 | } |
| 306 | |
| 307 | |
| 308 | extern char const * character_get_namecxx . . $ pvpgn/bnetd/character_get_name(4383355f43ab5a1b).(t_charactercxx . . $ pvpgn/bnetd/t_character# const * ch) |
| 309 | { |
| 310 | if (!ch) |
| 311 | { |
| 312 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL character"); |
| 313 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 314 | } |
| 315 | return ch->namecxx . . $ pvpgn/bnetd/character#name.; |
| 316 | } |
| 317 | |
| 318 | |
| 319 | extern char const * character_get_realmnamecxx . . $ pvpgn/bnetd/character_get_realmname(4383355f43ab5a1b).(t_charactercxx . . $ pvpgn/bnetd/t_character# const * ch) |
| 320 | { |
| 321 | if (!ch) |
| 322 | { |
| 323 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL character"); |
| 324 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 325 | } |
| 326 | return ch->realmnamecxx . . $ pvpgn/bnetd/character#realmname.; |
| 327 | } |
| 328 | |
| 329 | |
| 330 | extern t_character_classcxx . . $ pvpgn/bnetd/t_character_class# character_get_classcxx . . $ pvpgn/bnetd/character_get_class(6292f687fef1cd87).(t_charactercxx . . $ pvpgn/bnetd/t_character# const * ch) |
| 331 | { |
| 332 | if (!ch) |
| 333 | { |
| 334 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL character"); |
| 335 | return character_class_nonecxx . . $ pvpgn/bnetd/character_class_none.; |
| 336 | } |
| 337 | return bncharacter_class_to_character_classcxx . . $ pvpgn/bnetd/bncharacter_class_to_character_class(605f1dea4b550d22).(ch->chclasscxx . . $ pvpgn/bnetd/character#chclass.); |
| 338 | } |
| 339 | |
| 340 | |
| 341 | extern char const * character_get_playerinfocxx . . $ pvpgn/bnetd/character_get_playerinfo(4383355f43ab5a1b).(t_charactercxx . . $ pvpgn/bnetd/t_character# const * ch) |
| 342 | { |
| 343 | t_d2char_infocxx . . $ pvpgn/t_d2char_info# d2char_info; |
| 344 | static char playerinfo[sizeof(t_d2char_infocxx . . $ pvpgn/t_d2char_info#)+4]; |
| 345 | |
| 346 | if (!ch) |
| 347 | { |
| 348 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL character"); |
| 349 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 350 | } |
| 351 | |
| 352 | /* |
| 353 | ff 0f 68 00 ..h. |
| 354 | 0x0040: 01 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 ................ |
| 355 | 0x0050: d8 94 f6 08 b1 65 77 02 65 76 69 6c 67 72 75 73 .....ew.evilgrus |
| 356 | 0x0060: 73 6c 65 72 00 56 44 32 44 42 65 74 61 57 65 73 sler.VD2DBetaWes |
| 357 | 0x0070: 74 2c 74 61 72 61 6e 2c 83 80 ff ff ff ff ff 2f t,taran,......./ |
| 358 | 0x0080: ff ff ff ff ff ff ff ff ff ff 03 ff ff ff ff ff ................ |
| 359 | 0x0090: ff ff ff ff ff ff ff ff ff ff ff 07 80 80 80 80 ................ |
| 360 | 0x00a0: ff ff ff 00 |
| 361 | |
| 362 | */ |
| 363 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb1cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb1., ch->unknownb1cxx . . $ pvpgn/bnetd/character#unknownb1.); |
| 364 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb2cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb2., ch->unknownb2cxx . . $ pvpgn/bnetd/character#unknownb2.); |
| 365 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.helmgfxcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#helmgfx., ch->helmgfxcxx . . $ pvpgn/bnetd/character#helmgfx.); |
| 366 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.bodygfxcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#bodygfx., ch->bodygfxcxx . . $ pvpgn/bnetd/character#bodygfx.); |
| 367 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.leggfxcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#leggfx., ch->leggfxcxx . . $ pvpgn/bnetd/character#leggfx.); |
| 368 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.lhandweaponcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#lhandweapon., ch->lhandweaponcxx . . $ pvpgn/bnetd/character#lhandweapon.); |
| 369 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.lhandgfxcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#lhandgfx., ch->lhandgfxcxx . . $ pvpgn/bnetd/character#lhandgfx.); |
| 370 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.rhandweaponcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#rhandweapon., ch->rhandweaponcxx . . $ pvpgn/bnetd/character#rhandweapon.); |
| 371 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.rhandgfxcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#rhandgfx., ch->rhandgfxcxx . . $ pvpgn/bnetd/character#rhandgfx.); |
| 372 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb3cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb3., ch->unknownb3cxx . . $ pvpgn/bnetd/character#unknownb3.); |
| 373 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb4cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb4., ch->unknownb4cxx . . $ pvpgn/bnetd/character#unknownb4.); |
| 374 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb5cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb5., ch->unknownb5cxx . . $ pvpgn/bnetd/character#unknownb5.); |
| 375 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb6cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb6., ch->unknownb6cxx . . $ pvpgn/bnetd/character#unknownb6.); |
| 376 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb7cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb7., ch->unknownb7cxx . . $ pvpgn/bnetd/character#unknownb7.); |
| 377 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb8cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb8., ch->unknownb8cxx . . $ pvpgn/bnetd/character#unknownb8.); |
| 378 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb9cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb9., ch->unknownb9cxx . . $ pvpgn/bnetd/character#unknownb9.); |
| 379 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb10cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb10., ch->unknownb10cxx . . $ pvpgn/bnetd/character#unknownb10.); |
| 380 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb11cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb11., ch->unknownb11cxx . . $ pvpgn/bnetd/character#unknownb11.); |
| 381 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.chclasscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#chclass., ch->chclasscxx . . $ pvpgn/bnetd/character#chclass.); |
| 382 | bn_int_setcxx . . $ pvpgn/bn_int_set(e97e500db3ec3c79).(&d2char_info.unknown1cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknown1., ch->unknown1cxx . . $ pvpgn/bnetd/character#unknown1.); |
| 383 | bn_int_setcxx . . $ pvpgn/bn_int_set(e97e500db3ec3c79).(&d2char_info.unknown2cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknown2., ch->unknown2cxx . . $ pvpgn/bnetd/character#unknown2.); |
| 384 | bn_int_setcxx . . $ pvpgn/bn_int_set(e97e500db3ec3c79).(&d2char_info.unknown3cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknown3., ch->unknown3cxx . . $ pvpgn/bnetd/character#unknown3.); |
| 385 | bn_int_setcxx . . $ pvpgn/bn_int_set(e97e500db3ec3c79).(&d2char_info.unknown4cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknown4., ch->unknown4cxx . . $ pvpgn/bnetd/character#unknown4.); |
| 386 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.levelcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#level., ch->levelcxx . . $ pvpgn/bnetd/character#level.); |
| 387 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.statuscxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#status., ch->statuscxx . . $ pvpgn/bnetd/character#status.); |
| 388 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.titlecxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#title., ch->titlecxx . . $ pvpgn/bnetd/character#title.); |
| 389 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb13cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb13., ch->unknownb13cxx . . $ pvpgn/bnetd/character#unknownb13.); |
| 390 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.emblembgccxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#emblembgc., ch->emblembgccxx . . $ pvpgn/bnetd/character#emblembgc.); |
| 391 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.emblemfgccxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#emblemfgc., ch->emblemfgccxx . . $ pvpgn/bnetd/character#emblemfgc.); |
| 392 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.emblemnumcxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#emblemnum., ch->emblemnumcxx . . $ pvpgn/bnetd/character#emblemnum.); |
| 393 | bn_byte_setcxx . . $ pvpgn/bn_byte_set(9656657e14223459).(&d2char_info.unknownb14cxx . . $ pvpgn/$anonymous_type_37d0d0c67ba6cc0e_63#unknownb14., ch->unknownb14cxx . . $ pvpgn/bnetd/character#unknownb14.); |
| 394 | |
| 395 | stdcxx . . $ std/::memcpy(playerinfo, &d2char_info, sizeof(d2char_info)); |
| 396 | stdcxx . . $ std/::strcpy(&playerinfo[sizeof(d2char_info)], ch->guildnamecxx . . $ pvpgn/bnetd/character#guildname.); |
| 397 | |
| 398 | return playerinfo; |
| 399 | } |
| 400 | |
| 401 | |
| 402 | extern char const * character_get_guildnamecxx . . $ pvpgn/bnetd/character_get_guildname(4383355f43ab5a1b).(t_charactercxx . . $ pvpgn/bnetd/t_character# const * ch) |
| 403 | { |
| 404 | if (!ch) |
| 405 | { |
| 406 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL character"); |
| 407 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 408 | } |
| 409 | return ch->guildnamecxx . . $ pvpgn/bnetd/character#guildname.; |
| 410 | } |
| 411 | |
| 412 | |
| 413 | extern int character_verify_charlistcxx . . $ pvpgn/bnetd/character_verify_charlist(dc3f188880ec4a95).(t_charactercxx . . $ pvpgn/bnetd/t_character# const * ch, char const * charlist) |
| 414 | { |
| 415 | char * temp; |
| 416 | char const * tok1; |
| 417 | char const * tok2; |
| 418 | |
| 419 | if (!ch) |
| 420 | { |
| 421 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL character"); |
| 422 | return -1; |
| 423 | } |
| 424 | if (!charlist) |
| 425 | { |
| 426 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL character"); |
| 427 | return -1; |
| 428 | } |
| 429 | |
| 430 | temp = xstrdupcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:49:9`!(charlist); |
| 431 | |
| 432 | tok1 = (char const *)stdcxx . . $ std/::strtok(temp, ","); /* std::strtok modifies the string it is passed */ |
| 433 | tok2 = stdcxx . . $ std/::strtok(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, ","); |
| 434 | while (tok1) |
| 435 | { |
| 436 | if (!tok2) |
| 437 | { |
| 438 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "bad character list \"{}\"", temp); |
| 439 | break; |
| 440 | } |
| 441 | |
| 442 | if (strcasecmp(tok1, ch->realmnamecxx . . $ pvpgn/bnetd/character#realmname.) == 0 && strcasecmp(tok2, ch->namecxx . . $ pvpgn/bnetd/character#name.) == 0) |
| 443 | { |
| 444 | xfreecxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:51:9`!(temp); |
| 445 | return 0; |
| 446 | } |
| 447 | |
| 448 | tok1 = stdcxx . . $ std/::strtok(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, ","); |
| 449 | tok2 = stdcxx . . $ std/::strtok(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, ","); |
| 450 | } |
| 451 | xfreecxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:51:9`!(temp); |
| 452 | |
| 453 | return -1; |
| 454 | } |
| 455 | |
| 456 | |
| 457 | extern int characterlist_createcxx . . $ pvpgn/bnetd/characterlist_create(5c4306d8553b3696).(char const * dirname) |
| 458 | { |
| 459 | characterlist_headcxx . . $ pvpgn/bnetd/characterlist_head. = list_create(); |
| 460 | return 0; |
| 461 | } |
| 462 | |
| 463 | |
| 464 | extern int characterlist_destroycxx . . $ pvpgn/bnetd/characterlist_destroy(b126dc7c1de90089).(void) |
| 465 | { |
| 466 | t_elem * curr; |
| 467 | t_charactercxx . . $ pvpgn/bnetd/t_character# * ch; |
| 468 | |
| 469 | if (characterlist_headcxx . . $ pvpgn/bnetd/characterlist_head.) |
| 470 | { |
| 471 | LIST_TRAVERSEcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/list.h:94:9`!(characterlist_head, curr) |
| 472 | { |
| 473 | ch = (t_charactercxx . . $ pvpgn/bnetd/t_character#*)elem_get_data(curr); |
| 474 | if (!ch) /* should not happen */ |
| 475 | { |
| 476 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "characterlist contains NULL item"); |
| 477 | continue; |
| 478 | } |
| 479 | |
| 480 | if (list_remove_elem(characterlist_headcxx . . $ pvpgn/bnetd/characterlist_head., &curr) < 0) |
| 481 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "could not remove item from list"); |
| 482 | xfreecxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/xalloc.h:51:9`!(ch); |
| 483 | } |
| 484 | |
| 485 | if (list_destroy(characterlist_headcxx . . $ pvpgn/bnetd/characterlist_head.) < 0) |
| 486 | return -1; |
| 487 | characterlist_headcxx . . $ pvpgn/bnetd/characterlist_head. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 488 | } |
| 489 | |
| 490 | return 0; |
| 491 | } |
| 492 | |
| 493 | |
| 494 | extern t_charactercxx . . $ pvpgn/bnetd/t_character# * characterlist_find_charactercxx . . $ pvpgn/bnetd/characterlist_find_character(145ff0e0c6ef3f48).(char const * realmname, char const * charname) |
| 495 | { |
| 496 | t_elem * curr; |
| 497 | t_charactercxx . . $ pvpgn/bnetd/t_character# * ch; |
| 498 | |
| 499 | if (!realmname) |
| 500 | { |
| 501 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL realmname"); |
| 502 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 503 | } |
| 504 | if (!charname) |
| 505 | { |
| 506 | eventlogcxx . . $ pvpgn/eventlog(f1d8dd72586f1e25).(eventlog_level_errorcxx . . $ pvpgn/eventlog_level_error., __FUNCTION__, "got NULL charname"); |
| 507 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 508 | } |
| 509 | |
| 510 | LIST_TRAVERSEcxx . . $ `/build/tmp.prHwK0hYwT/package/src/common/list.h:94:9`!(characterlist_head, curr) |
| 511 | { |
| 512 | ch = (t_charactercxx . . $ pvpgn/bnetd/t_character#*)elem_get_data(curr); |
| 513 | if (strcasecmp(ch->namecxx . . $ pvpgn/bnetd/character#name., charname) == 0 && strcasecmp(ch->realmnamecxx . . $ pvpgn/bnetd/character#realmname., realmname) == 0) |
| 514 | return ch; |
| 515 | } |
| 516 | |
| 517 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 518 | } |
| 519 | |
| 520 | } |
| 521 | |
| 522 | } |