Would you like to react to this message? Create an account in a few clicks or log in to continue.

    * Bug Fixes * Channelog

    avatar
    Hex00010
    Admin
    Admin


    Posts : 10
    Join date : 2010-02-20

    * Bug Fixes * Channelog Empty * Bug Fixes * Channelog

    Post by Hex00010 Sun Feb 21, 2010 11:22 pm

    ###########################################################
    # Hex00010 - Core Developer for www.infinitygaming.org
    #
    # Lots of Bugs Fixed, Just look below and you will see
    #
    #Start Date : 02/21/2010
    #
    #Start Time: 8:00
    #
    #Endin Time: 9:15
    ###########################################################


    1. Worldsession.h Orginal

    line 183 was orginally

    Code:

    uint16 unk_230;

    Which is now

    Code:

    uint16 movementflags;



    2. WorldSession.h Orginal
    Added a new line of script on line 402

    Code:

    void HandleReadyForAccountTimesOpcode( WorldPacket& recv_data);


    3. WorldSession.h Orginal
    Lines 687-689
    Removed

    Code:

    // Vehicles
       void HandleVehicleDismiss(WorldPacket & recv_data);


    4. WorldSession.h
    Added new scripts on lines 759-764

    Code:

    // Vehicles
       void HandleEnterVehicleOpcode(WorldPacket & recv_data);
       void HandleVehicleDismiss(WorldPacket & recv_data);
       void HandleVehicleSwitchSeat(WorldPacket & recv_data);
       void HandleVehicleEjectPassenger(WorldPacket & recv_data);


    5. DBCStores.cpp
    Added new scripts on lines 75-76

    Code:

    SERVER_DECL DBCStorage<VehicleEntry> dbcVehicleEntry;
    SERVER_DECL DBCStorage<VehicleSeatEntry> dbcVehicleSeatEntry;




    6. UnitFunctions.h orginal
    Deleted Lines from 4749-4886
    Which contained the following code

    Code:

       int SpawnVehicle(lua_State * L, Unit * ptr)
       {
          uint32 entry = (uint32)luaL_checknumber(L,1);
          float x = CHECK_FLOAT(L,2);
          float y = CHECK_FLOAT(L,3);
          float z = CHECK_FLOAT(L,4);
          float o = CHECK_FLOAT(L,5);
          uint32 faction = (uint32)luaL_checknumber(L,6);
          uint32 duration = (uint32)luaL_checknumber(L,7);
          uint32 phase = luaL_optint(L, 8, ptr->m_phase);

          CreatureProto * proto = CreatureProtoStorage.LookupEntry(entry);
          CreatureInfo * info = CreatureNameStorage.LookupEntry(entry);
          if(proto != NULL && info != NULL) {
             CreatureSpawn * sp = new CreatureSpawn;
             sp->entry = entry;
             uint32 DisplayID = 0;
             uint8 gender = info->GenerateModelId(&DisplayID);
             sp->displayid = DisplayID;
             sp->form = 0;
             sp->id = 0;
             sp->movetype = 0;
             sp->x = x;
             sp->y = y;
             sp->z = z;
             sp->o = o;
             sp->emote_state = 0;
             sp->flags = 0;
             sp->factionid = faction;
             sp->bytes0 = 0;
             sp->bytes1 = 0;
             sp->bytes2 = 0;
             //sp->respawnNpcLink = 0;
             sp->stand_state = 0;
             sp->channel_target_creature = sp->channel_target_go = sp->channel_spell = 0;
             sp->MountedDisplayID = 0;
             sp->Item1SlotDisplay = 0;
             sp->Item2SlotDisplay = 0;
             sp->Item3SlotDisplay = 0;

             Creature * p = ptr->GetMapMgr()->CreateCreature(entry,true);
             ASSERT(p);
             p->Load(sp, (uint32)NULL, NULL);
             p->setGender(gender);
             p->spawnid = 0;
             p->m_spawn = 0;
             p->m_phase = phase;
             delete sp;
             p->PushToWorld(ptr->GetMapMgr());
             p->SetFaction(faction);
             p->_setFaction();
             p->SetInstanceID(ptr->GetInstanceID());
             p->SetMapId(ptr->GetMapId());
             if(duration)
                p->Despawn(duration,0);
             PUSH_UNIT(L,p);
          }
          else
             lua_pushnil(L);
          return 1;
       }

       int SetVehicle(lua_State * L, Unit * ptr)
       {
          TEST_PLAYER()
          Player * plr = TO_PLAYER(ptr);
          Unit * unitVehicle = CHECK_UNIT(L,1);
          int8 seat = luaL_checkint(L,2); //make it -1 for auto-choose.
          Vehicle * vehicle = ((Vehicle*)unitVehicle);
          if (vehicle && seat >= -1)
             vehicle->AddPassenger(plr,seat);
          return 0;
       }

       int GetVehicle(lua_State * L, Unit * ptr)
       {
          TEST_PLAYER()
          Player * plr = TO_PLAYER(ptr);
          Vehicle * ride = plr->GetVehicle();
          if(ride != NULL)
             PUSH_UNIT(L,ride);
          else
             lua_pushnil(L);
          return 1;
       }

       int RemoveFromVehicle(lua_State * L, Unit * ptr)
       {
          TEST_PLAYER()
          Player * plr = TO_PLAYER(ptr);
          Vehicle * veh = plr->GetVehicle();
          if(veh != NULL)
             veh->RemovePassenger(plr);
          return 0;
       }

       int GetVehicleSeat(lua_State * L, Unit * ptr)
       {
          TEST_PLAYER()
          Player * plr = TO_PLAYER(ptr);
          if(plr->GetVehicle() != NULL)
             lua_pushinteger(L,plr->GetVehicleSeat());
          else
             lua_pushnil(L);
          return 1;
       }

       int IsVehicle(lua_State * L, Unit * ptr)
       {
          TEST_UNIT()
          lua_pushboolean(L, ( TO_CREATURE(ptr)->IsVehicle() ) ? 1 : 0);
          return 1;
       }

       int GetPassengerCount(lua_State * L, Unit * ptr)
       {
          TEST_UNIT()
          Vehicle * veh = static_cast<Vehicle*>(ptr);
          if (veh)
             lua_pushinteger(L,veh->GetPassengerCount());
          else
             lua_pushnil(L);
          return 1;
       }

       int MoveVehicle(lua_State * L, Unit * ptr)
       {
          TEST_UNIT()
          float x = CHECK_FLOAT(L,1);
          float y = CHECK_FLOAT(L,2);
          float z = CHECK_FLOAT(L,3);
          float o = CHECK_FLOAT(L,4);
          Vehicle * veh = static_cast<Vehicle*>(ptr);
          if(veh != NULL)
             veh->MoveVehicle(x,y,z,o);
          return 0;
       }





    7. Functiontables.h
    Removed code from lines 383-%

    Code:

    { "SpawnVehicle", &luaUnit::SpawnVehicle},
       { "SetVehicle", &luaUnit::SetVehicle},
       { "GetVehicle", &luaUnit::GetVehicle},
       { "RemoveFromVehicle", &luaUnit::RemoveFromVehicle},
       { "GetVehicleSeat", &luaUnit::GetVehicleSeat},
       { "IsVehicle", &luaUnit::IsVehicle},
       { "GetPassengerCount", &luaUnit::GetPassengerCount},
       { "MoveVehicle", &luaUnit::MoveVehicle},




    8. Stats.cpp
    Fixed Player level


    Code:

    const uint32 grayLevel[PLAYER_LEVEL_CAP+1] = {0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,13,14,15,16,17,18,19,20,21,22,22,23,24,25,26,27,28,29,30,31,31,32,33,34,35,35,36,37,38,39,39,40,41,42,43,43,44,45,46,47,47,48,49,50,51,51,52,53,54,55,56,
    #if PLAYER_LEVEL_CAP==80
          57,58,59,60,61,62,63,64,65,65

    Changed to

    Code:

    const uint32 grayLevel[PLAYER_LEVEL_CAP+1] = {0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,13,14,15,16,17,18,19,20,21,22,22,23,24,25,26,27,28,29,30,31,31,32,33,34,35,35,36,37,38,39,39,40,41,42,43,43,44,45,46,47,47,48,49,50,51,51,52,53,54,55,56,
    #if PLAYER_LEVEL_CAP==255
          57,58,59,60,61,62,63,64,65,65




    9. Added memory watch system
    10. Fixed Spells ( Paladin )
    11. Fixed LUAEngine




    If i do anymore i will update you

    Anyways Have fun Take care and remember

    I CANT FIX BUGS IF YOU DONT REPORT THEM i had to find these all by myself except for Paladin spell thanks to a user reporting the bug



    *SQL FILE* is to big to post here so ill give it to you whenever you get on msn but Proof of work ill show example of script


    Code:

    ALTER TABLE `creature_proto`  ADD COLUMN `vehicleid` INT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `summonguard`;

    DROP TABLE IF EXISTS `vehicle_data`;
    CREATE TABLE `vehicle_data` (
      `Id` int(30) NOT NULL AUTO_INCREMENT,
      `flags` int(30) NOT NULL DEFAULT '0',
      `moveflags` int(30) NOT NULL DEFAULT '0',
      `spell1` int(30) NOT NULL DEFAULT '0',
      `spell2` int(30) NOT NULL DEFAULT '0',
      `spell3` int(30) NOT NULL DEFAULT '0',
      `spell4` int(30) NOT NULL DEFAULT '0',
      `spell5` int(30) NOT NULL DEFAULT '0',
      PRIMARY KEY (`Id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=530 DEFAULT CHARSET=latin1;

    INSERT INTO `vehicle_data` VALUES ('1', '0', '0', '0', '0', '0', '0', '0');
    INSERT INTO `vehicle_data` VALUES ('6', '0', '0', '0', '0', '0', '0', '0');
    INSERT INTO `vehicle_data` VALUES ('7', '0', '0', '0', '0', '0', '0', '0');
    INSERT INTO `vehicle_data` VALUES ('8', '0', '0', '0', '0', '0', '0', '0');
    INSERT INTO `vehicle_data` VALUES ('14', '0', '0', '0', '0', '0', '0', '0');
    INSERT INTO `vehicle_data` VALUES ('16', '0', '0', '0', '0', '0', '0', '0');
    INSERT INTO `vehicle_data` VALUES ('17', '0', '0', '0', '0', '0', '0', '0');
    avatar
    Hex00010
    Admin
    Admin


    Posts : 10
    Join date : 2010-02-20

    * Bug Fixes * Channelog Empty Re: * Bug Fixes * Channelog

    Post by Hex00010 Sun Feb 21, 2010 11:53 pm

    Check Commit's Smile in svn

      Current date/time is Wed May 08, 2024 3:00 am