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

[svn] Fix some typos.

Original author: megamage
Date: 2008-11-10 17:19:35-06:00

Files:
1 modified

Legend:

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

    r207 r209  
    1111 * This program is distributed in the hope that it will be useful, 
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414 * GNU General Public License for more details. 
    1515 * 
    1616 * You should have received a copy of the GNU General Public License 
    1717 * along with this program; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1919 */ 
    2020 
     
    271271        SetAcceptTicket(true); 
    272272 
    273     // players always accept  
     273    // players always accept 
    274274    if(GetSession()->GetSecurity() == SEC_PLAYER) 
    275275        SetAcceptWhispers(true); 
     
    368368    m_temporaryUnsummonedPetNumber = 0; 
    369369    //cache for UNIT_CREATED_BY_SPELL to allow 
    370     //returning reagests for temporarily removed pets 
     370    //returning reagents for temporarily removed pets 
    371371    //when dying/logging out 
    372372    m_oldpetspell = 0; 
     
    434434    CleanupsBeforeDelete(); 
    435435 
     436    // it must be unloaded already in PlayerLogout and accessed only for loggined player 
    436437    //m_social = NULL; 
    437438 
     
    488489bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId ) 
    489490{ 
     491    //FIXME: outfitId not used in player creating 
     492 
    490493    Object::_Create(guidlow, 0, HIGHGUID_PLAYER); 
    491494 
     
    665668    if (getPowerType()==POWER_MANA) 
    666669    { 
    667         UpdateMaxPower(POWER_MANA);                         // Update max Mana (for add bonus from intelect) 
     670        UpdateMaxPower(POWER_MANA);                         // Update max Mana (for add bonus from intellect) 
    668671        SetPower(POWER_MANA,GetMaxPower(POWER_MANA)); 
    669672    } 
     
    831834    } 
    832835 
    833     uint32 UnderWaterTime = 1*MINUTE*1000;                  // default leangthL 1 min 
     836    uint32 UnderWaterTime = 1*MINUTE*1000;                  // default length 1 min 
    834837 
    835838    AuraList const& mModWaterBreathing = GetAurasByType(SPELL_AURA_MOD_WATER_BREATHING); 
     
    15101513    if(GetSession()->Expansion() < mEntry->Expansion()) 
    15111514    { 
    1512         sLog.outDebug("Player %s using client without required expansion tried teleport to non accessable map %u", GetName(), mapid); 
     1515        sLog.outDebug("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid); 
    15131516 
    15141517        if(GetTransport()) 
     
    15451548    // We have to perform this check before the teleport, otherwise the 
    15461549    // ObjectAccessor won't find the flag. 
    1547     if (duel && this->GetMapId()!=mapid) 
     1550    if (duel && GetMapId()!=mapid) 
    15481551    { 
    15491552        GameObject* obj = ObjectAccessor::GetGameObject(*this, GetUInt64Value(PLAYER_DUEL_ARBITER)); 
     
    15551558    SetUnitMovementFlags(0); 
    15561559 
    1557     if ((this->GetMapId() == mapid) && (!m_transport)) 
     1560    if ((GetMapId() == mapid) && (!m_transport)) 
    15581561    { 
    15591562        // prepare zone change detect 
     
    32663269    updateVisualBits.SetCount(PLAYER_END); 
    32673270 
    3268         // TODO: really implement OWNER_ONLY and GROUP_ONLY. Flags can be found in UpdateFields.h 
     3271    // TODO: really implement OWNER_ONLY and GROUP_ONLY. Flags can be found in UpdateFields.h 
    32693272 
    32703273    updateVisualBits.SetBit(OBJECT_FIELD_GUID); 
     
    32793282 
    32803283    updateVisualBits.SetBit(UNIT_FIELD_CHARMEDBY); 
    3281         updateVisualBits.SetBit(UNIT_FIELD_CHARMEDBY+1); 
     3284    updateVisualBits.SetBit(UNIT_FIELD_CHARMEDBY+1); 
    32823285 
    32833286    updateVisualBits.SetBit(UNIT_FIELD_TARGET); 
     
    33153318    updateVisualBits.SetBit(UNIT_FIELD_DISPLAYID); 
    33163319    updateVisualBits.SetBit(UNIT_FIELD_NATIVEDISPLAYID); 
     3320    updateVisualBits.SetBit(UNIT_FIELD_MOUNTDISPLAYID); 
    33173321    updateVisualBits.SetBit(UNIT_FIELD_BYTES_1); 
    3318     updateVisualBits.SetBit(UNIT_FIELD_MOUNTDISPLAYID); 
    33193322    updateVisualBits.SetBit(UNIT_FIELD_PETNUMBER); 
    33203323    updateVisualBits.SetBit(UNIT_FIELD_PET_NAME_TIMESTAMP); 
     
    33243327    updateVisualBits.SetBit(UNIT_FIELD_BYTES_2); 
    33253328 
    3326         updateVisualBits.SetBit(PLAYER_DUEL_ARBITER); 
    3327         updateVisualBits.SetBit(PLAYER_DUEL_ARBITER+1); 
     3329    updateVisualBits.SetBit(PLAYER_DUEL_ARBITER); 
     3330    updateVisualBits.SetBit(PLAYER_DUEL_ARBITER+1); 
    33283331    updateVisualBits.SetBit(PLAYER_FLAGS); 
    3329         updateVisualBits.SetBit(PLAYER_GUILDID); 
    3330         updateVisualBits.SetBit(PLAYER_GUILDRANK); 
     3332    updateVisualBits.SetBit(PLAYER_GUILDID); 
     3333    updateVisualBits.SetBit(PLAYER_GUILDRANK); 
    33313334    updateVisualBits.SetBit(PLAYER_BYTES); 
    33323335    updateVisualBits.SetBit(PLAYER_BYTES_2); 
     
    37243727void Player::SendDelayResponse(const uint32 ml_seconds) 
    37253728{ 
     3729    //FIXME: is this delay time arg really need? 50msec by default in code 
    37263730    WorldPacket data( SMSG_QUERY_TIME_RESPONSE, 4+4 ); 
    37273731    data << (uint32)time(NULL); 
     
    37633767    } 
    37643768 
    3765     // update visbility 
     3769    // update visibility 
    37663770    ObjectAccessor::UpdateVisibilityForPlayer(this); 
    37673771 
     
    42304234            // leave old channel 
    42314235            (*i)->Leave(GetGUID(),false);                   // not send leave channel, it already replaced at client 
    4232             std::string name = (*i)->GetName();             // stroe name, (*i)erase in LeftChannel 
     4236            std::string name = (*i)->GetName();             // store name, (*i)erase in LeftChannel 
    42334237            LeftChannel(*i);                                // remove from player's channel list 
    42344238            cMgr->LeftChannel(name);                        // delete if empty 
     
    42654269    if(modGroup >= BASEMOD_END || modType >= MOD_END) 
    42664270    { 
    4267         sLog.outError("ERROR in HandleBaseModValue(): nonexisted BaseModGroup of wrong BaseModType!"); 
     4271        sLog.outError("ERROR in HandleBaseModValue(): non existed BaseModGroup of wrong BaseModType!"); 
    42684272        return; 
    42694273    } 
     
    43024306    if(modGroup >= BASEMOD_END || modType > MOD_END) 
    43034307    { 
    4304         sLog.outError("ERROR: trial to access nonexisted BaseModGroup or wrong BaseModType!"); 
     4308        sLog.outError("ERROR: trial to access non existed BaseModGroup or wrong BaseModType!"); 
    43054309        return 0.0f; 
    43064310    } 
     
    49744978                    if (_spell_idx->second->skillId == id) 
    49754979                    { 
    4976                         // this may remove more than one spell (dependants) 
     4980                        // this may remove more than one spell (dependents) 
    49774981                        removeSpell(itr->first); 
    49784982                        next = m_spells.begin(); 
     
    52495253    // code block for underwater state update 
    52505254    UpdateUnderwaterState(m, x, y, z); 
    5251  
    52525255 
    52535256    CheckExploreSystem(); 
     
    63146317                SetRestType(REST_TYPE_NO); 
    63156318 
    6316                 // Set player to FFA PVP when not in rested enviroment. 
     6319                // Set player to FFA PVP when not in rested environment. 
    63176320                if(sWorld.IsFFAPvPRealm()) 
    63186321                    SetFlag(PLAYER_FLAGS,PLAYER_FLAGS_FFA_PVP); 
     
    69336936 
    69346937        if (roll_chance_f(chance)) 
    6935             this->CastSpell(Target, spellInfo->Id, true, item); 
     6938            CastSpell(Target, spellInfo->Id, true, item); 
    69366939    } 
    69376940 
     
    77967799                data << uint32(0xaa7) << uint32(0x0);       // 23 2727 Fel Reaver - Horde control 
    77977800                data << uint32(0xaa6) << uint32(0x0);       // 24 2726 Fel Reaver - Alliance control 
    7798                 data << uint32(0xaa5) << uint32(0x1);       // 25 2725 Fel Reaver uncontroled (1 - yes, 0 - no) 
     7801                data << uint32(0xaa5) << uint32(0x1);       // 25 2725 Fel Reaver uncontrolled (1 - yes, 0 - no) 
    77997802                data << uint32(0xaa4) << uint32(0x0);       // 26 2724 Boold Elf - Horde control 
    78007803                data << uint32(0xaa3) << uint32(0x0);       // 27 2723 Boold Elf - Alliance control 
     
    80218024    data << uint64(guid); 
    80228025    uint32 cost = sWorld.getConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : resetTalentsCost(); 
    8023     data << cost; 
    80248026    data << cost; 
    80258027    GetSession()->SendPacket( &data ); 
     
    86228624} 
    86238625 
     8626 
    86248627bool Player::HasItemCount( uint32 item, uint32 count, bool inBankAlso ) const 
    86258628{ 
     
    90319034    } 
    90329035 
    9033     // not specific slot or have spece for partly store only in specific slot 
     9036    // not specific slot or have space for partly store only in specific slot 
    90349037 
    90359038    // in specific bag 
     
    96869689                    return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED; 
    96879690 
    9688                 // offhand item must can be stored in inventitory for offhand item and it also must be unequipped 
     9691                // offhand item must can be stored in inventory for offhand item and it also must be unequipped 
    96899692                Item *offItem = GetItemByPos( INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND ); 
    96909693                ItemPosCountVec off_dest; 
     
    97979800    } 
    97989801 
    9799     // not specific slot or have spece for partly store only in specific slot 
     9802    // not specific slot or have space for partly store only in specific slot 
    98009803 
    98019804    // in specific bag 
     
    98599862    } 
    98609863 
    9861     // not specific bag or have spece for partly store only in specific bag 
     9864    // not specific bag or have space for partly store only in specific bag 
    98629865 
    98639866    // search stack for merge to 
     
    1049110494 
    1049210495        // if this original item then it need create record in inventory 
    10493         // in case trade we laready have item in other player inventory 
     10496        // in case trade we already have item in other player inventory 
    1049410497        pLastItem->SetState(in_characterInventoryDB ? ITEM_CHANGED : ITEM_NEW, this); 
    1049510498    } 
     
    1073510738{ 
    1073610739    // used when entering arena 
    10737     // distroys all conjured items 
     10740    // destroys all conjured items 
    1073810741    sLog.outDebug( "STORAGE: DestroyConjuredItems" ); 
    1073910742 
     
    1128311286    if(pTrader) 
    1128411287    { 
    11285         // send yellow "Trade cancelled" message to both traders 
     11288        // send yellow "Trade canceled" message to both traders 
    1128611289        WorldSession* ws; 
    1128711290        ws = GetSession(); 
     
    1136911372    } 
    1137011373} 
    11371  
    1137211374 
    1137311375void Player::RemoveAllEnchantments(EnchantmentSlot slot) 
     
    1149911501                    { 
    1150011502                        int32 basepoints = int32(enchant_amount); 
    11501                         // Random Property Exist - try found basepoints for spell (basepoints depencs from item suffix factor) 
     11503                        // Random Property Exist - try found basepoints for spell (basepoints depends from item suffix factor) 
    1150211504                        if (item->GetItemRandomPropertyId() !=0 && !enchant_amount) 
    1150311505                        { 
     
    1219612198 
    1219712199    // if not exist then created with set uState==NEW and rewarded=false 
    12198     QuestStatusData& questStatusData =  mQuestStatus[quest_id]; 
     12200    QuestStatusData& questStatusData = mQuestStatus[quest_id]; 
    1219912201    if (questStatusData.uState != QUEST_NEW) 
    1220012202        questStatusData.uState = QUEST_CHANGED; 
     
    1256812570 
    1256912571                // each-from-all exclusive group ( < 0) 
    12570                 // can be start if only all quests in prev quest exclusive group complited and rewarded 
     12572                // can be start if only all quests in prev quest exclusive group completed and rewarded 
    1257112573                ObjectMgr::ExclusiveQuestGroups::iterator iter = objmgr.mExclusiveQuestGroups.lower_bound(qPrevInfo->GetExclusiveGroup()); 
    1257212574                ObjectMgr::ExclusiveQuestGroups::iterator end  = objmgr.mExclusiveQuestGroups.upper_bound(qPrevInfo->GetExclusiveGroup()); 
     
    1426414266    //NOTE: the "order by `bag`" is important because it makes sure 
    1426514267    //the bagMap is filled before items in the bags are loaded 
    14266     //NOTE2: the "order by `slot`" is needed becaue mainhand weapons are (wrongly?) 
     14268    //NOTE2: the "order by `slot`" is needed because mainhand weapons are (wrongly?) 
    1426714269    //expected to be equipped before offhand items (TODO: fixme) 
    1426814270 
     
    1439114393        { 
    1439214394            // fill mail 
    14393             MailItemsInfo mi;                               // item list prepering 
     14395            MailItemsInfo mi;                               // item list preparing 
    1439414396 
    1439514397            for(int i = 0; !problematicItems.empty() && i < MAX_MAIL_ITEMS; ++i) 
     
    1493914941    } 
    1494014942 
    14941     //Send opcode 811. true or flase means, whether you have current raid/heroic instances 
     14943    //Send opcode 811. true or false means, whether you have current raid/heroic instances 
    1494214944    data.Initialize(SMSG_UPDATE_INSTANCE_OWNERSHIP); 
    1494314945    data << uint32(hasBeenSaved); 
     
    1592715929} 
    1592815930 
    15929  
    1593015931void Player::RemoveMiniPet() 
    1593115932{ 
     
    1644216443        if ((*i)->isVisibleForOrDetect(this,true)) 
    1644316444        { 
     16445 
    1644416446            (*i)->SendUpdateToPlayer(this); 
    1644516447            m_clientGUIDs.insert((*i)->GetGUID()); 
     
    1662016622    WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+m_spells.size()*8); 
    1662116623    data << GetGUID(); 
    16622     data << uint8(0x0); 
     16624    data << uint8(0x0);                                     // flags (0x1, 0x2) 
    1662316625    time_t curTime = time(NULL); 
    1662416626    for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr) 
     
    1701617018        return; 
    1701717019 
    17018     // Get spell cooldwn 
     17020    // Get spell cooldown 
    1701917021    int32 cooldown = GetSpellRecoveryTime(spellInfo); 
    1702017022    // Apply spellmods 
     
    1758817590{ 
    1758917591    WorldPacket data(SMSG_SET_REST_START, 4); 
    17590     data << uint32(0);                                      // unknown, may be rest state time or expirience 
     17592    data << uint32(0);                                      // unknown, may be rest state time or experience 
    1759117593    GetSession()->SendPacket(&data); 
    1759217594 
     
    1818618188        } 
    1818718189        default: 
    18188             sLog.outError("HasItemFitToSpellReqirements: Not handeled spell reqirement for item class %u",spellInfo->EquippedItemClass); 
     18190            sLog.outError("HasItemFitToSpellReqirements: Not handled spell requirement for item class %u",spellInfo->EquippedItemClass); 
    1818918191            break; 
    1819018192    } 
     
    1823118233uint32 Player::GetResurrectionSpellId() 
    1823218234{ 
    18233     // search priceless resurrection possabilities 
     18235    // search priceless resurrection possibilities 
    1823418236    uint32 prio = 0; 
    1823518237    uint32 spell_id = 0; 
     
    1838718389    Item* item = GetWeaponForAttack(attType,true); 
    1838818390 
    18389     // unarmmed only with base attack 
     18391    // unarmed only with base attack 
    1839018392    if(attType != BASE_ATTACK && !item) 
    1839118393        return 0; 
     
    1860718609{ 
    1860818610    if(m_canParry==value) 
    18609         return;  
     18611        return; 
    1861018612 
    1861118613    m_canParry = value; 
     
    1861618618{ 
    1861718619    if(m_canBlock==value) 
    18618         return;  
     18620        return; 
    1861918621 
    1862018622    m_canBlock = value;