This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [TrinityCore 3.3.5a] Error creating a custom race character.  (Read 5589 times)

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #15 on: July 17, 2016, 01:50:06 pm »
IF you enter Character creation, change your char to preference and press continue.

Expected Behavior: It should send you to Character Login without Popup. Character should be in Login displayed.

Actual behavior: Failed to create charater. An error is in 100% of all cases in Worldserver.

 Find that one. Should be on the bottom, one of the first after pressing continue.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

kestus0756

  • Registred Member
  • Race Changer
  • *****
  • Posts: 26
    • View Profile
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #16 on: July 17, 2016, 03:31:51 pm »
"Player::Create: Possible hacking-attempt: account 3 tried creating a character named "Test" with an invalid race/class pair (12/7) - refusing to do so" I think that's what you mean.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Amaroth

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 1219
    • View Profile
    • Amaroth's Tools
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #17 on: July 17, 2016, 08:38:15 pm »
In the end, nothing new. Can someone who actually can find a thing in core create a list of things which are checked by worldserver while its determining wheter race and class combination is correct or no? it would be much easier to find a thing which kestus has forgotten or missed.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
English YT tutorial channel. Check it out if you preffer videos over walls of text.:
https://www.youtube.com/AmarothEng

Want to support me for my releases and/or tutorials? You can send donation via Paypal to:
jantoms@seznam.cz

kestus0756

  • Registred Member
  • Race Changer
  • *****
  • Posts: 26
    • View Profile
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #18 on: July 18, 2016, 11:03:04 am »
Yeah, a LOT easier.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #19 on: July 18, 2016, 08:54:33 pm »
Code: [Select]
bool Player::Create(ObjectGuid::LowType guidlow, WorldPackets::Character::CharacterCreateInfo const* createInfo)
{
    //FIXME: outfitId not used in player creating
    /// @todo need more checks against packet modifications

    Object::_Create(ObjectGuid::Create<HighGuid::Player>(guidlow));

    m_name = createInfo->Name;

    PlayerInfo const* info = sObjectMgr->GetPlayerInfo(createInfo->Race, createInfo->Class);
    if (!info)
    {
        TC_LOG_ERROR("entities.player", "Player::Create: Possible hacking attempt: Account %u tried to create a character named '%s' with an invalid race/class pair (%u/%u) - refusing to do so.",
                GetSession()->GetAccountId(), m_name.c_str(), createInfo->Race, createInfo->Class);
        return false;
    }

PlayerInfo is built in
void ObjectMgr::LoadPlayerInfo()

More precisely
Code: [Select]
   {
        uint32 oldMSTime = getMSTime();
        //                                                0     1      2    3        4          5           6
        QueryResult result = WorldDatabase.Query("SELECT race, class, map, zone, position_x, position_y, position_z, orientation FROM playercreateinfo");

        if (!result)
        {
            TC_LOG_ERROR("server.loading", ">> Loaded 0 player create definitions. DB table `playercreateinfo` is empty.");
            exit(1);
        }
        else
        {
            uint32 count = 0;

            do
            {
                Field* fields = result->Fetch();

                uint32 current_race  = fields[0].GetUInt8();
                uint32 current_class = fields[1].GetUInt8();
                uint32 mapId         = fields[2].GetUInt16();
                uint32 areaId        = fields[3].GetUInt32(); // zone
                float  positionX     = fields[4].GetFloat();
                float  positionY     = fields[5].GetFloat();
                float  positionZ     = fields[6].GetFloat();
                float  orientation   = fields[7].GetFloat();

                if (current_race >= MAX_RACES)
                {
                    TC_LOG_ERROR("sql.sql", "Wrong race %u in `playercreateinfo` table, ignoring.", current_race);
                    continue;
                }

                ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(current_race);
                if (!rEntry)
                {
                    TC_LOG_ERROR("sql.sql", "Wrong race %u in `playercreateinfo` table, ignoring.", current_race);
                    continue;
                }

                if (current_class >= MAX_CLASSES)
                {
                    TC_LOG_ERROR("sql.sql", "Wrong class %u in `playercreateinfo` table, ignoring.", current_class);
                    continue;
                }

                if (!sChrClassesStore.LookupEntry(current_class))
                {
                    TC_LOG_ERROR("sql.sql", "Wrong class %u in `playercreateinfo` table, ignoring.", current_class);
                    continue;
                }

                // accept DB data only for valid position (and non instanceable)
                if (!MapManager::IsValidMapCoord(mapId, positionX, positionY, positionZ, orientation))
                {
                    TC_LOG_ERROR("sql.sql", "Wrong home position for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race);
                    continue;
                }

                if (sMapStore.LookupEntry(mapId)->Instanceable())
                {
                    TC_LOG_ERROR("sql.sql", "Home position in instanceable map for class %u race %u pair in `playercreateinfo` table, ignoring.", current_class, current_race);
                    continue;
                }

                PlayerInfo* info = new PlayerInfo();
                info->mapId = mapId;
                info->areaId = areaId;
                info->positionX = positionX;
                info->positionY = positionY;
                info->positionZ = positionZ;
                info->orientation = orientation;
                info->displayId_m = rEntry->MaleDisplayID;
                info->displayId_f = rEntry->FemaleDisplayID;
                _playerInfo[current_race][current_class] = info;

                ++count;
            }
            while (result->NextRow());

            TC_LOG_INFO("server.loading", ">> Loaded %u player create definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
        }
    }
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

kestus0756

  • Registred Member
  • Race Changer
  • *****
  • Posts: 26
    • View Profile
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #20 on: July 19, 2016, 07:34:34 am »
I did every single thing right, not even an one mistake but that error shows up still, I've rechecked everything like 2 times now and nothing wrong. Could you actually help me through a teamviewer or something because I honestly have no clue what's wrong?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #21 on: July 19, 2016, 07:28:51 pm »
I send you a pm with my skype addy. From there we'll try to find some time.

If I find the source for the problem, I'll note it here.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

soliant

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 5
    • View Profile
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #22 on: November 28, 2016, 09:00:02 pm »
Have you find the error for the "wrong xx race in playercreateinfo.......".

I've got the same error with mangos core 3.3.5a rev.12340.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [TrinityCore 3.3.5a] Error creating a custom race charac
« Reply #23 on: November 28, 2016, 09:29:22 pm »
Quote from: "soliant"
Have you find the error for the "wrong xx race in playercreateinfo.......".

I've got the same error with mangos core 3.3.5a rev.12340.
Never worked much with Mangos, despite it being the initial source to TC. However, it should be about the same cause of error.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »