Show
Ignore:
Timestamp:
11/19/08 13:43:02 (17 years ago)
Author:
yumileroy
Message:

[svn] * Avoid access to bag item prototype for getting bag size, use related item update field instead as more fast source.
* Better check client inventory pos data received in some client packets to skip invalid cases.
* Removed some unnecessary database queries.
* Make guid lookup for adding ignore async.
* Added two parameter versions of the AsyncQuery? function
* Make queries for adding friends async. - Hunuza
* Replace some PQuery() calls with more simple Query() - Hunuza
* Mark spell as executed instead of deleteable to solve crash.
*** Source mangos.

**Its a big commit. so test with care... or without care.... whatever floats your boat.

Original author: KingPin?
Date: 2008-11-05 20:10:19-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Guild.cpp

    r102 r173  
    113113bool Guild::AddMember(uint64 plGuid, uint32 plRank) 
    114114{ 
    115     if(Player::GetGuildIdFromDB(plGuid) != 0)               // player already in guild 
     115    Player* pl = objmgr.GetPlayer(plGuid); 
     116    if(pl) 
     117    { 
     118        if(pl->GetGuildId() != 0) 
    116119        return false; 
     120    } 
     121    else 
     122    { 
     123        if(Player::GetGuildIdFromDB(plGuid) != 0)           // player already in guild 
     124        return false; 
     125    } 
    117126 
    118127    // remove all player signs from another petitions 
     
    143152        Id, GUID_LOPART(plGuid), newmember.RankId, dbPnote.c_str(), dbOFFnote.c_str()); 
    144153 
    145     Player* pl = objmgr.GetPlayer(plGuid); 
    146154    if(pl) 
    147155    { 
     
    675683 
    676684    CharacterDatabase.PExecute("UPDATE guild_rank SET rights='%u' WHERE rid='%u' AND guildid='%u'", rights, (rankId+1), Id); 
     685} 
     686 
     687int32 Guild::GetRank(uint32 LowGuid) 
     688{ 
     689    MemberList::iterator itr = members.find(LowGuid); 
     690    if (itr==members.end()) 
     691        return -1; 
     692         
     693    return itr->second.RankId; 
    677694} 
    678695