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

[svn] * Implement honor rewards from quests - Source Mangos

Original author: KingPin?
Date: 2008-10-22 07:02:05-05:00

Files:
1 modified

Legend:

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

    r44 r96  
    2525#include "WorldPacket.h" 
    2626#include "WorldSession.h" 
     27#include "Formulas.h" 
    2728 
    2829GossipMenu::GossipMenu() 
     
    467468    } 
    468469 
    469     data << uint32(0);                                      // Honor points reward, not implemented 
    470     data << uint32(pQuest->GetRewSpell());                  // reward spell, this spell will display (icon) (casted if RewSpellCast==0) 
     470    // rewarded honor points. Multiply with 10 to satisfy client    data << uint32(pQuest->GetRewSpell());                  // reward spell, this spell will display (icon) (casted if RewSpellCast==0) 
     471    data << uint32(10*Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills())); 
    471472    data << uint32(pQuest->GetRewSpellCast());              // casted spell 
    472473    data << uint32(pQuest->GetCharTitleId());               // CharTitleId, new 2.4.0, player gets this title (id from CharTitles) 
     
    542543    data << uint32(pQuest->GetRewSpellCast());              // casted spell 
    543544 
    544     data << uint32(0);                                      // Honor points reward, not implemented 
     545    // rewarded honor points 
     546    data << uint32(Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills())); 
    545547    data << uint32(pQuest->GetSrcItemId()); 
    546548    data << uint32(pQuest->GetFlags() & 0xFFFF); 
     
    676678 
    677679    data << uint32(pQuest->GetRewOrReqMoney()); 
    678     data << uint32(0x00);                                   // new 2.3.0. Honor points 
     680    // rewarded honor points. Multiply with 10 to satisfy client 
     681    data << uint32(10*Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills())); 
    679682    data << uint32(0x08);                                   // unused by client? 
    680683    data << uint32(pQuest->GetRewSpell());                  // reward spell, this spell will display (icon) (casted if RewSpellCast==0) 
    681684    data << uint32(pQuest->GetRewSpellCast());              // casted spell 
    682     data << uint32(0);                                      // Honor points reward, not implemented 
     685    data << uint32(0x00);                                   // unk, NOT honor 
    683686    pSession->SendPacket( &data ); 
    684687    sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );