Jump to content

Anti

Members
  • Posts

    81
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Anti

  1. Hmm, i dont really get it..

    m_session->GetSecurity()

    gives out strings and not integers or iam wrong..

    thats why i convert these strings (SEC_PLAYER, SEC_MODERATOR, ect.) to integers with this method..

    with your way you will have problems on this part:

    if (gmLevel <= secLevelOfTele) // Very simple here. Need more checks!

    cause "secLevelOfTele woul be a string , or iam totally wrong with that?

    yes you are.

    Try this little example, which will show you one secret of a enums.

    #include <iostream>
    
    using std::cout;
    
    enum Acc {
       pl = 1,
       gm,
       ad
    };
    
    Acc get();
    int main(){
    
       int m;
       m = pl;
       cout << m << "\\n";
       cout << get() << "\\n";
       if ( m < get())
           cout << "Anti the best!" << "\\n";
       system("PAUSE");
    }
    Acc get()
    { 
       Acc sec = ad;
       return sec;
    }

  2. I would replace this part

    uint32 tmp_gmlevel = 0;

    by

    AccountTypes gmlevel = m_session->GetSecurity();

    and work with it in future.

    Or we can do next:

    uint32 tmp_gmlevel = m_session->GetSecurity();

    In this case we can drop this indian code :)

    +    switch(m_session->GetSecurity()) // Maybe check this later with the direct GMLevelID from Account table
    +    {
    +    case SEC_PLAYER:
    +        tmp_gmlevel = 0;
    +        break;
    +    case SEC_MODERATOR:
    +        tmp_gmlevel = 1;
    +        break;
    +    case SEC_GAMEMASTER:
    +        tmp_gmlevel = 2;
    +        break;
    +    case SEC_ADMINISTRATOR:
    +        tmp_gmlevel = 3;
    +        break;
    +    default: 
    +        return false;
    +    }

    My version without the indian code.

    http://pastebin.com/m1e03e63

    sql:

    ALTER TABLE game_tele ADD COLUMN `security` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `name`;

  3. why can't you improve rastikzzz's patch it is still 3.0.9/3.1.3 (not sure) it was one the best patches released
    Rather artful patch I need some times to understand how it work.

    The main problem is, that vehicles are creatures. We need to discuss it and choose a right way to implement a vehilces.

    We must spawn vehicle, not creature. May be smbd knows a right way to implement it.

  4. //VF_HAS_FUEL                     = 0x0100,                   // TODO : find out what energy type is fuel and implement this

    This is used for example in Ulduar vehicles I think...(on TC2 it works, I think we can inspire..)

    As i said: When you spawn vehicle(.npc add) its not vehicle, but normal creature.

    Flying vehicles does not work? I tried frost wyrm from DK start location, and it cant fly. Maybe just wrong movement type, on rastikzzz's patch it worked fine :/

    Accessories is not complete, when vehicle dies accessory not, etc(but Im working on this)

    Thats all I found...

    Well, I should do the same :)

    ok i'll try to implement HAS_VUEL flag.

  5. Well, we can try it, but at first we need to solve some problems with vehicles (steam power, when you spawn vehicle it is only creature etc). But if somebody want, it would be good to write code for Wintergrasp end/start a correct queue players into battle.

    For a tests it's possible to use the wintergrasp code from TC2.

    Can you send me more detailed descriptions about this bugs?

  6. Sorry for taking so long to post my views ,but what I've found and if you do the same you'll see the error, I don't know where to start at to fix and don't have enough programming skills to do it.

    First off failed hunk in Object.h, second problem is 48 depreciated code warnings in VS 2008pro with only the vehicle patch in place. My expriance has been if a warning pops up it means that it is broken but how to fix? I haven't a clue and it won't matter what sql's you have in place if the data isn't flowing because of a bad line it won't work. :rolleyes:

    Thats is what I've found and why I think vehicles are not working....So whats to be done to get it to compile correctly? that's the question next. :eek:

    About 1st problem:

    I attached my diff. Just reaplly the patch.

    http://filebeam.com/5404b7b8a39d70af3b60751a2ba6abe3

    2nd: Just forget about a warnings.

    I'll try to do some fixes but i don't know for what to undertake at first.

  7. Mb smbd wii need this fix in diff:

    diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in
    index b919b50..3e7c8cb 100644
    --- a/src/mangosd/mangosd.conf.dist.in
    +++ b/src/mangosd/mangosd.conf.dist.in
    @@ -1405,6 +1405,6 @@ Ra.Secure = 1
    #
    ###################################################################################################################
    
    -AutoBroadcast.Enabled = 1
    -AutoBroadcast.Position = 2
    -AutoBroadcast.Interval = 30000
    +Broadcast.Enabled = 1
    +Broadcast.Position = 2
    +Broadcast.Interval = 30000
    

  8. I tryed it. The patch works. But exist many bugs with this patch: u can't fly or move using flyable vehicle, you can't cast all ranged spell.

    2009-12-02 18:38:42 ERROR:SESSION: opcode CMSG_PET_CAST_SPELL (0x01F0) have unprocessed tail data (read stop at 44 from 97)

    Very interesting patch but it doen't work correctly now.

  9. Okay but i think the problem is not in sql files who i need to add in db .. Just doesn't work and i don't know what to do.

    u can check it: you need to create DK than go to the ebon hold castle, use .add 39700. Use it and if u will be on the dragon, the patch work.

    But i have i problem: when i try to patch my sources with vehicle patch i got 2 conflicts.

    1st in unit.cpp - i'd fix it by myself.

    2nd in object.cpp

    ***************
    *** 262,267 ****
                 case TYPEID_UNIT:
                 {
                     flags2 = ((Creature*)this)->canFly() ? (MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_LEVITATING) : MOVEMENTFLAG_NONE;
                 }
                 break;
                 case TYPEID_PLAYER:
    --- 262,269 ----
                 case TYPEID_UNIT:
                 {
                     flags2 = ((Creature*)this)->canFly() ? (MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_LEVITATING) : MOVEMENTFLAG_NONE;
    +                 if(((Unit*)this)->GetVehicleGUID())
    +                     flags2 |= (MOVEMENTFLAG_ONTRANSPORT | MOVEMENTFLAG_FLY_UNK1);
                 }
                 break;
                 case TYPEID_PLAYER:
    

    I tryed to fix it, but i don't know where it must be situated.

    in 8880 change this part of code had been rewrited.

                case TYPEID_UNIT:
               {
                   flags2 = MOVEMENTFLAG_NONE;
    
                   if (!((Creature*)this)->IsStopped())
                       flags2 |= MOVEMENTFLAG_FORWARD;         // not set if not really moving
    
                   if (((Creature*)this)->canFly())
                   {
                       flags2 |= MOVEMENTFLAG_LEVITATING;      // (ok) most seem to have this
    
                       if (((Creature*)this)->IsStopped())
                           flags2 |= MOVEMENTFLAG_FLY_UNK1;    // (ok) possibly some "hover" mode
                       else
                       {
                           if (((Creature*)this)->IsMounted())
                               flags2 |= MOVEMENTFLAG_FLYING;  // seems to be often when mounted
                           /* for further research
                           else
                               flags2 |= MOVEMENTFLAG_FLYING2; // not seen, but work on some, even if not "correct"
                           */
                       }
                   }
               }

    and i'm totaly confused now.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use