// Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "stdpch.h" #include "sphrase_com.h" using namespace std; using namespace NLMISC; // *************************************************************************** const CSPhraseCom CSPhraseCom::EmptyPhrase; // *************************************************************************** bool CSPhraseCom::operator==(const CSPhraseCom &p) const { if(Bricks.size()!=p.Bricks.size()) return false; for(uint i=0;i compBricks; // static for speed if(impulse.isReading()) { // read impulse.serialCont(compBricks); // uncompress contReset(Bricks); Bricks.resize(compBricks.size()); for(uint i=0;i=65535) { nlwarning("ERROR: found a .sbrick SheetId with SubId>=65535: %s", Bricks[i].toString().c_str()); // and leave 0. } else { compBricks[i]= (uint16)(compId+1); } } } // write impulse.serialCont(compBricks); } } // *************************************************************************** void CSPhraseSlot::serial(NLMISC::IStream &impulse) { impulse.serial(Phrase); impulse.serial(KnownSlot); impulse.serial(PhraseSheetId); } // *************************************************************************** void CSPhraseMemorySlot::serial(NLMISC::IStream &impulse) { impulse.serial(MemoryLineId); impulse.serial(MemorySlotId); impulse.serial(PhraseId); } // *************************************************************************** void CFaberMsgItem::serial(NLMISC::IStream &impulse) { impulse.serial(InvId); impulse.serial(IndexInInv); impulse.serial(Quantity); }