Jump to content

zhenya``

Members
  • Posts

    46
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by zhenya``

  1. Q2Vladimir: may be use lowguid instead of full guid in typedef std::map<uint64, Item*> ItemByGuidMap?
  2. $query_num = mysql_query("SELECT COUNT(*) FROM `arena_team_member` WHERE `arenateamid`='$row[arenateamid]'"); try to change $query_num = mysql_query("SELECT COUNT(*) FROM `arena_team_member` WHERE `arenateamid`=$row['arenateamid']");
  3. did you use dual spec talent patch ?
  4. Rewrite some items operations like GetItemCount with avoid full range slots search. And i create sets with some special kinds items like durations,limitedzone for avoid some loops. NTY because i have no place for tests but should work version 0.1 http://paste.org.ru/?4zwa4n
  5. --- RemoveGridMapReference: p(26,31) value = 1 --- getNGrid(37,32,0) = 49caf70 ... --- RemoveGridMapReference: p(26,31) value = 1 --- getNGrid(37,32,0) = 0 double SetUnloadReferenceLock
  6. new thread as Vladimir want some info about TRADE example: 1) 1 player place all items in free bag which it want to trade and 1 player must have 1 free bag 2) 1 player init trade with 2 player 3) 1 player place all items from bag , 2 player place money 4) 1 player swap bags .. as items it trade save position.. _player->tradeItems[tradeSlot] = pos; if(Item* item =_player->GetItemByPos( _player->tradeItems[i] )) not passing.. for(int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i) { if(_player->tradeItems[i] != NULL_SLOT ) { if(Item* item =_player->GetItemByPos( _player->tradeItems[i] )) { if(!item->CanBeTraded()) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; } } } if(_player->pTrader->tradeItems[i] != NULL_SLOT) { if(Item* item =_player->pTrader->GetItemByPos( _player->pTrader->tradeItems[i]) ) { if(!item->CanBeTraded()) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; } } } } possible fix.. not allow swap items which containes trade items.. or send cancel trade.. if item is not found 2 possible fix for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i) { if(_player->tradeItems[i] != NULL_SLOT ) { Item* item =_player->GetItemByPos( _player->tradeItems[i] ); if(!item || !item->CanBeTraded()) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; } } if(_player->pTrader->tradeItems[i] != NULL_SLOT) { Item* item =_player->pTrader->GetItemByPos( _player->pTrader->tradeItems[i]); if(!item || !item->CanBeTraded()) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; } } } 5. as a result 1 player get money 2 player get nothing.
  7. so i will post my work on inventory later... now some about TRADE example: 1) 1 player place all items in free bag which it want to trade and 1 player must have 1 free bag 2) 1 player init trade with 2 player 3) 1 player place all items from bag , 2 player place money 4) 1 player swap bags .. as items it trade save position.. _player->tradeItems[tradeSlot] = pos; if(Item* item =_player->GetItemByPos( _player->tradeItems[i] )) not passing.. for(int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i) { if(_player->tradeItems[i] != NULL_SLOT ) { if(Item* item =_player->GetItemByPos( _player->tradeItems[i] )) { if(!item->CanBeTraded()) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; } } } if(_player->pTrader->tradeItems[i] != NULL_SLOT) { if(Item* item =_player->pTrader->GetItemByPos( _player->pTrader->tradeItems[i]) ) { if(!item->CanBeTraded()) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; } } } } possible fix.. not allow swap items which containes trade items.. or send cancel trade.. if item is not found 2 possible fix for (int i=0; i<TRADE_SLOT_TRADED_COUNT; ++i) { if(_player->tradeItems[i] != NULL_SLOT ) { Item* item =_player->GetItemByPos( _player->tradeItems[i] ); if(!item || !item->CanBeTraded()) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; } } if(_player->pTrader->tradeItems[i] != NULL_SLOT) { Item* item =_player->pTrader->GetItemByPos( _player->pTrader->tradeItems[i]); if(!item || !item->CanBeTraded()) { SendTradeStatus(TRADE_STATUS_TRADE_CANCELED); return; } } } 5. as a result 1 player get money 2 player get nothing.
  8. can someone post a line which cause a crash?
  9. btw i rewrite some inventory operations my question: function: void Player::_LoadInventory(QueryResult *result, uint32 timediff) if item in INVENTORY_SLOT_BAG_0 all okey in item = StoreItem(dest, item, true); i have this != NULL but in others bag slots or bags ( QuickEquipItem(dest, item); and BankItem(dest, item, true); and itr->second->StoreItem(slot, item, true); ) i have Player NULL :-( how to avoid it ? i need non NULL player..
  10. apply enchantment while disarm state because disarm may be not only main hand (UNIT_FLAG_DISARMED) this is function. bool CanUseAttackType( uint8 attacktype ) const { switch(attacktype) { case BASE_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISARMED); case OFF_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS_2,UNIT_FLAG2_DISARM_OFFHAND); case RANGED_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS_2,UNIT_FLAG2_DISARM_RANGED); } return true; } btw. you can rewrite spelleffects with disarm effect.. in more generic way. GetWeaponForAttack not exclude players with disarm flag... missing check may be...
  11. also i think need to check m_lootGenerated in bool Item::CanBeTraded(bool mail) and in WorldSession::HandleSellItemOpcode ( 2 variants are possible after sell item doesn`t go to buyback slot or sell isn`t possible? ) and i worked with items which have duration. there is no checks at all (sell items, trade,auction) l.. i think its a problem..
  12. 1) fixing dupe and apply enchantment while disarm state http://paste2.org/p/609895 2) move GroupSet to GroupMap ( nty ) and some replacements .count to .find for better performance http://paste2.org/p/609894 * Who has been writing this patch? Please include either forum user names or email addresses. zhenya
  13. why not implement all opcodehandler in own thread? not only movement
  14. what about vs players? this is only for mobs
  15. try to change Item *pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, i ); iif(pItem2 && pItem2->GetProto()->Socket[0].Color) to Item *pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, i ); if(pItem2 && !pItem2->IsBroken() && pItem2->GetProto()->Socket[0].Color)
  16. in GameObject::Update place this case GO_ACTIVATED: { switch(GetGoType()) { case GAMEOBJECT_TYPE_DOOR: case GAMEOBJECT_TYPE_BUTTON: if (GetGOInfo()->GetAutoCloseTime() && (m_cooldownTime < time(NULL))) ResetDoorOrButton(); break; _ case GAMEOBJECT_TYPE_CHEST: if (!isSpawned()) SetLootState(GO_JUST_DEACTIVATED); _ break; default: break; } break; }
  17. all okey in pools.. problem with unlimited veins in Visible updates. i found possible problem with chest with quest items. if (loot_type == LOOT_FISHING) go->getFishLoot(loot,this); go->SetLootState(GO_ACTIVATED); all freeze go has GO_ACTIVADED lootstate need to test with if (loot_type == LOOT_FISHING) go->getFishLoot(loot,this); go->SetLootState(GO_JUST_DEACTIVATED);
  18. i can`t do this because i didn`t use git.
  19. someone can do diffs. 1) Typo in calculate reputation reward void Player::RewardReputation(Quest const *pQuest) int32 rep = pQuest->RewRepValue[i]; should be int32 rep = CalculateReputationGain(pQuest->GetQuestLevel(), pQuest->RewRepValue[i], pQuest->RewRepFaction[i], true); 2) typo in HomeMovementGenerator uint32 travel_time = i_destinationHolder.SetDestination(traveller, x, y, z); should be i_destinationHolder.SetDestination(traveller, x, y, z); uint32 travel_time = i_destinationHolder.GetTotalTravelTime(); ? 3) missing break case 31930: // Judgements of the Wise case 63375: // Improved Stormstrike damage = damage * unitTarget->GetCreateMana() / 100; default: break; should be case 63375: // Improved Stormstrike damage = damage * unitTarget->GetCreateMana() / 100; break; default: break;
×
×
  • 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