// Send to all players of the same guild // NOTE: plr is the guild leader OR replace plr->GetGuildId() with the specific ID of the guild Player * thisPlr; objmgr._playerslock.AcquireReadLock(); HM_NAMESPACE::hash_map::const_iterator itr; for (itr = objmgr._players.begin(); itr != objmgr._players.end(); itr++) { thisPlr = itr->second; if( thisPlr->GetGuildId() == plr->GetGuildId() ) { // Same Faction Item * item = objmgr.CreateItem( 99999 , thisPlr ); thisPlr->GetItemInterface()->AddItemToFreeSlot( item ); } } objmgr._playerslock.ReleaseReadLock();